+ Reply to Thread
Results 1 to 7 of 7

Running 3 different macros across selected multiple worksheets in one workbook

Hybrid View

  1. #1
    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

    I assume you know how to create buttons. So, make 3 buttons and assign these macros. Hope it's what you want.


    Run Calibrate:
    Sub RunCalibrate()
        Dim ws As Worksheet
        For Each ws In Sheets
            If Len(ws.Name) = 2 And ws.Name <> "WP" And ws.Name <> "NS" Then
                ws.Activate 'use this if your macro requires the worksheets to be the active sheet to work
                Call Calibrate
            End If
        Next
        Sheets("Contents").Activate
    End Sub
    Run CogCalibrate:
    Sub RunCogCalibrate()
        Dim ws As Worksheet
        For Each ws In Sheets
            If ws.Name = "WP" Or ws.Name = "NS" Then
                ws.Activate 'use this if your macro requires the worksheets to be the active sheet to work
                Call CogCalibrate
            End If
        Next
        Sheets("Contents").Activate
    End Sub
    Run BIGCalibrate:
    Sub RunBIGCalibrate()
        Sheets("BIG").Activate 'use this if your macro requires the worksheet to be the active sheet to work
        Call BIGCalibrate
        Sheets("Contents").Activate
    End Sub

    Edit: Just noticed you mentioned the 28 worksheets are 'beginning from SN to GD'. You might have to show all those worksheet names, I don't know how they look like. I am only assuming they are all 2 characters long.
    Last edited by millz; 11-12-2013 at 05:34 AM.

+ 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