+ Reply to Thread
Results 1 to 3 of 3

Getting VBA to choose which macro to run

  1. #1
    Registered User
    Join Date
    01-19-2005
    Posts
    5

    Getting VBA to choose which macro to run

    Users select one of two options in a cell, and then click a button. I want different macros run on pressing the button depending on what was selected in the cell

    Thanks

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Sub Button1_Click()

    If Worksheets("Sheet1").Range("A1") = 1 Then
    Call Macro1
    ElseIf Worksheets("Sheet1").Range("A1") = 2 Then
    Call Macro2
    Else
    MsgBox "Choose a correct value"
    End If

    End Sub



    - Mangesh

  3. #3
    Registered User
    Join Date
    01-19-2005
    Posts
    5
    Thanks, thats great stuff

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1