+ Reply to Thread
Results 1 to 7 of 7

Running 3 different macros across selected multiple worksheets in one workbook

Hybrid View

  1. #1
    Registered User
    Join Date
    10-10-2009
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Running 3 different macros across selected multiple worksheets in one workbook

    Excellent. Thanks very much. RunBigCalibrate and RunCogcalibrate work perfectly. Unfortunately the worksheet names for the third macro are of varying lengths. I am writing the macro now and will get back to you once I have finished and tested them. Is there an option to maybe tell this macro to omit sheets instead of telling it to find specified sheets?

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Running 3 different macros across selected multiple worksheets in one workbook

    To 'omit' like you wanted, probably like this:

    Sub RunCalibrate()
        Dim ws As Worksheet
        For Each ws In Sheets
            Select Case ws.Name
                Case "WP", "NS", "BIG", "Contents", "Instructions", "DescriptiveStats", "CalibrationSummary", "Data"
                Case Else
                    ws.Activate 'use this if your macro requires the worksheets to be the active sheet to work
                    Call Calibrate
            End Select
        Next
        Sheets("Contents").Activate
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Hide or Unhide Multiple Worksheets in a selected workbook
    By nchavan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2013, 10:11 AM
  2. Replies: 2
    Last Post: 12-26-2012, 05:02 AM
  3. Running Macros on multiple worksheets
    By shivrklfc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2012, 11:11 AM
  4. Multiple Users using Shared Workbook and Running Macros
    By Tayque_J_Holmes in forum Excel General
    Replies: 4
    Last Post: 09-06-2012, 12:26 AM
  5. copy selected range from multiple workbooks into multiple worksheets in one workbook
    By novak100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2012, 05:52 AM

Tags for this Thread

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