Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Sep 2001
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Repeat Macro for all sheets on single workbood (English)

    Hope someone can help with this problem. I have a spreadsheet that need to run the same macro on each of the sheets. Is there a way so that I can build into the macro so that it repeats itself on each sheet once and continues untill all the sheets have been done?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Repeat Macro for all sheets on single workbood (English)

    It should be possible to do what you want, bit how you do it would depend on exactly what the macro does.

    You could step through each sheet in the workbook, activate each in turn and call the macro which presumably carrie sout some operation on the active sheet. You could use code like the following :<pre>Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Sheets
    ws.Activate
    'Call your macro here
    Next
    End Sub</pre>

    If you need more specific assistance, post the code you want to run for each sheet, and somebody will assist.

    Andrew C

  3. #3
    Lounger
    Join Date
    Sep 2001
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Repeat Macro for all sheets on single workbood (English)

    Thanks so much!

Posting Permissions

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