Excel button to a sheet

Solved
Hello

Can someone help me create a button in Excel that I can click to go to a sheet?

And a small other question, how do I create a text box + a validate button to enter a value into a cell of a sheet? Thank you.

12 answers

  1. Moderator
    Hello,
    In Excel, display your controls toolbar (view/toolbars/controls).
    • Click on the "command button" icon.
    • Draw the button in the desired location.
    • Right-click on the button/command button object/Edit ---> change the button text.
    • Right-click on the button/Properties allows you to access a lot of little things like color (Backcolor), font, etc...
    • Double-click on the button, a window (VBA) opens with the following text:

    Private Sub CommandButton1_Click() End Sub


    write between these 2 lines:
    Sheets("sheet name").select
    like this:
    Private Sub CommandButton1_Click() Sheets("sheet name").select End Sub


    In the controls toolbar, click on the icon: "disable design mode"
    and there you go
    65
    1. Hello,

      I followed these instructions, however when I click on the button, it takes me to the code and says: "Sub or Function not defined".
      Do you have a solution?
      0
    2. @VBAHi,

      It's because you're on Visio, right? It should work on Excel.
      If you're indeed on Visio, it's not possible. You can then use the "Behavior" option in the Developer tab to achieve the same result.
      0
    3. @VisioYes indeed, I am on Visio.

      Thank you for your solution!
      0
    4. Thank you for the information.
      0
    5. Great. Very well written. Thank you.
      0