Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Running Multipule macros (Same name different sheet)

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    Canberra AU
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi all,
    I'm new to the macro world and need a little help.
    I have a macro that is based on the sheet name and retreives data from different sources depending on that name, the macro is called Get_Data.
    I have about 10 sheets at the moment that use the same macro (Get_Data is a Template)
    what i would like to do is have all the Get_Data macros run when the workbook opens.
    Is there a way to have this happen without naming the macros ie: Get_Data1, get_Data2...etc and run from the workbook when its opened ?

    Much Appreciated
    Static

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Staticman

    I am not sure what you mean by "Is there a way to have this happen without naming the macros ie: Get_Data1, get_Data2...etc" But to have a Macro run upon opening you should place some code in the Private Module of the Workbook Object. To get there just right click on the Excel icon, next to "File" and select "View Code" then paste in this:

    Private Sub Workbook_Open()
    Run "Get_Data"
    End Sub



  3. #3
    New Member
    Join Date
    Mar 2002
    Location
    Canberra AU
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks Dave
    The Get_Data macro is on every sheet.
    I found that I need to change to the sheet then run the macro again.

Some videos you may like

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
  •