Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Programming Buttons in Excel

This is a discussion on Programming Buttons in Excel within the Excel Questions forums, part of the Question Forums category; Just getting started with VB and VBA . I do a lot of Workbooks monthly for my customers that I ...

  1. #1
    New Member
    Join Date
    Aug 2002
    Location
    Arkansas
    Posts
    33

    Default

    Just getting started with VB and VBA. I do a lot of Workbooks monthly for my customers that I import a .csv and I try to have it automated as much as possible. What I would like to do is add buttons to my first worksheet and hide the remainder sheets. Which I have accomplished. The problem I am having is programming the buttons on click to open a particular hidden sheet in the workbook. Is this possible and does anyone know what the command for this would be? I would greatly appreciate it.

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Location
    Puerto Vallarta, Mexico
    Posts
    869

    Default

    Not totally sure what you are asking, but you can write a macro and assign it to the button so that it will open the workbook you want. you can use the macro recorder for this to write the macro, then when you have it as you want it, assign that macro to a particular button

  3. #3
    VoG
    VoG is offline
    MrExcel MVP
    Moderator
    VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    63,472

    Default

    Sheets("Sheet1").Visible = True

    will unhide the sheet

    Sheets("Sheet1").Visible = False

    will hide the sheet

    Sheets("Sheet1").Visible = xlVeryHidden

    will hide it so the user cannot see it at all to "unhide" it.


  4. #4
    New Member
    Join Date
    Aug 2002
    Location
    Arkansas
    Posts
    33

    Default

    Sorry, I guess what I am asking is, I have a workbook with 5 sheets built. They are all hidden but the first sheet. On the first sheet I would like to place a button and have that programmed to open a particular hidden worksheet within that workbook. I have looked everywhere for a command to use in VBA but have yet to find anything.

  5. #5
    Board Regular
    Join Date
    Apr 2002
    Location
    Puerto Vallarta, Mexico
    Posts
    869

    Default

    Ok, how would you normally unhide the sheet, if you were doing it manually?

  6. #6
    Board Regular
    Join Date
    Apr 2002
    Location
    Puerto Vallarta, Mexico
    Posts
    869

    Default

    what I am going to try and do is walk you thru this.

  7. #7
    New Member
    Join Date
    Aug 2002
    Location
    Arkansas
    Posts
    33

    Default

    I'm apologize for not being able to explain this clearly. Sometimes I want to perform things that get to complex. Here is a better description. What I am really trying to accomplish, is when the button is clicked by a user, I would like a seperate window per say to open with the hidden sheet in int's contents, then I would have a button within that sheet to close out that window. Don't know if this is possible or not. I was thinking along the lines of a dialog box, but not sure that would be appropriate as I wouldn't be asking for any input. Hope this helps, and I do appreciate your help.

  8. #8
    Board Regular
    Join Date
    Apr 2002
    Location
    Puerto Vallarta, Mexico
    Posts
    869

    Default

    Ok, if you were doing this manually, how would you open the hidden sheet, that is what i want to know, then I will show you how to use the macro recorder to do it, and then assign it to a button.

  9. #9
    New Member
    Join Date
    Aug 2002
    Location
    Arkansas
    Posts
    33

    Default

    I would normally go to Menu/Format/Unhide, then select the hidden worksheet I would want unhidden. But is there a way to have that sheet open on top of the workbook in a seperate window, that could be closed out after viewing? Thanks

  10. #10
    Board Regular
    Join Date
    Apr 2002
    Location
    Puerto Vallarta, Mexico
    Posts
    869

    Default

    Do you know how to use the macro recorder?

Page 1 of 3 123 LastLast

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com