Macro for Dialog Box with buttons that select a worksheet...
Macro for Dialog Box with buttons that select a worksheet...
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Macro for Dialog Box with buttons that select a worksheet...

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I want to know if anyone can suggest an approach to a macro that will generate a dialog box, on opening a workbook, that will present a series of buttons (radio, 3D, whatever) that are linked to worksheets, such that when the buttons are activated, the user is taken to an appropriate worksheet?

  2. #2
    New Member
    Join Date
    Feb 2002
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    I'll assume you're using VBA and know a wee bit about macros...

    To create a form, go to the VB Editor in Excel using Alt+F11. Right-click on the Project pane and choose Insert...UserForm. Add buttons to the form. Double-click a button and type Sheets("Sheet2").Select replacing Sheet2 with the name of whatever sheet you want to activate.

    To make the for run when you open the spreadsheet, add the following code to Module1

    Public Sub Auto_Open()
    UserForm1.Show
    End Sub

User Tag List

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