Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Combining Macro Modules

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    Gern Blanstin
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I want to combine two Macros...
    I have two short modules that I want to run when a button is pressed. Right now, The button is associated with the Print Macro. Here's the code I want the button to perform:

    Sub PrintCheck()
    '
    ' PrintCheck Macro
    ' Yep!... It prints the check.
    '

    '
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    End Sub

    Sub Count()
    mycount = Range("a1") + 1
    Range("a1") = mycount
    End Sub

    Any help would be welcome...

    -Gern


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

    Default

    I just combined 9 short macros into one large one. Mine may not be the best way, but it works.

    First go to Macros, then Macros again. Find the macro you wish to add and click edit. The edit screen will appear. Highlight the macro between sub and sub end and right click.

    The look at the drop down box above the macro, select the macro you wish to copy to. Past it where you want it between sub and sub end. It's less confusing if you select the left button on the lower left hand corner of the edit window.

    Hope this helps (and works).

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
  •