Results 1 to 3 of 3

Combining multiple macros into one subroutine

Threaded View

  1. #1
    Registered User
    Join Date
    08-02-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Combining multiple macros into one subroutine

    I did some google searches and searched here as well and could not find what I was looking for. Other than creating a master macro to call each macro individually, how would I combine these to run in one macro?

    Sub CW1()
    Dim i As Long
    Application.ScreenUpdating = 0
    For i = 3 To ActiveSheet.UsedRange.Columns.Count Step 3
        Columns(i).ColumnWidth = 15
    Next: Application.ScreenUpdating = 1: End Sub
    
    Sub CW2()
    Dim i As Long
    Application.ScreenUpdating = 0
    For i = 4 To ActiveSheet.UsedRange.Columns.Count Step 3
        Columns(i).ColumnWidth = 5
    Next: Application.ScreenUpdating = 1: End Sub
    
    Sub CW3()
    Dim i As Long
    Application.ScreenUpdating = 0
    For i = 5 To ActiveSheet.UsedRange.Columns.Count Step 3
        Columns(i).ColumnWidth = 5
    Next: Application.ScreenUpdating = 1: End Sub
    Thanks for your help.
    Last edited by Quentyn; 08-05-2011 at 06:09 PM.

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