Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello:
I have four separate macros for a spreadsheet. I want to run all four macros at once and in a certain order. I want all four macros combined into one. Here is what I have done to "combine" these macros, so far. After my first macro, I have put the names of my other three macros. My first macro runs, but these last three do not. How can I get all four of these macros to run without the end user having to run the first macro and then run each of the other three manually and separately? Below is my macro. The last three lines are the names of the other three macros. These other three macros are in the same VBA screen as the combined macro. So, that's how the combined macro knows where to reference the other three: Range("A1").Select Selection.CurrentRegion.Select Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Key2:=Range("B2") _ , Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _ :=xlSortNormal Range("A1").Select Selection.Subtotal GroupBy:=1, Function:=xlCount, TotalList:=Array(4), _ Replace:=True, PageBreaks:=True, SummaryBelowData:=True Selection.Subtotal GroupBy:=2, Function:=xlCount, TotalList:=Array(4), _ Replace:=False, PageBreaks:=False, SummaryBelowData:=True Col_Headers Col_Width Format_Header Thanks! childofthe1980s |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Running VB macros | New Users to Excel | |||
Message box with multiple options running different macros | Excel Discussion (Misc queries) | |||
running macros from IF | Excel Worksheet Functions | |||
Running Macros when on the LAN | Excel Discussion (Misc queries) | |||
Running Macros | Excel Programming |