+ Reply to Thread
Results 1 to 6 of 6

Macro that calls other macros in different sheets

  1. #1
    Registered User
    Join Date
    04-29-2007
    Location
    Lisbon, Portugal
    Posts
    58

    Macro that calls other macros in different sheets

    Dear All,

    I'm trying to create a macro that calls other macros in the same workbook but in differente sheets. I've made a code that is working but doesn't seems to be the best one (if you see the sheets names are all much alike).
    The code is this:
    Please Login or Register  to view this content.
    Coul you try to help me on this one, please?

    Regards

    Manuel
    Last edited by VBA Noob; 05-05-2007 at 02:19 AM.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Try this macro

    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    05-04-2007
    Posts
    9
    If this is a macro on sheet1:
    Please Login or Register  to view this content.
    Then you should be able to run this code in another sheet:

    Please Login or Register  to view this content.
    Is that what you'r looking for?

  4. #4
    Registered User
    Join Date
    05-04-2007
    Posts
    9
    If you are trying to run one macro but have it apply to different sheets, you can declare a public sheet object and change it every time you run the macro.
    Please Login or Register  to view this content.

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    Hi,
    are you creating the same action in each sheet?

  6. #6
    Registered User
    Join Date
    04-29-2007
    Location
    Lisbon, Portugal
    Posts
    58
    Thank you all for your help!

    All tips were very useful.

    Dave: The action in each sheet is similar but not the same, therefore I had to create a macro for each one. By the way, what sould I do If the macro is the same for each sheet?

    Regards

    Manuel

+ 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