I have a simple request. I have two macros that do the following;
1.) The first macro opens and closes a 2 level outline. Summary and Input (Details).
2.) The second macro presents and sequentially serves up 14 different Ranges that represent subsets within the entire Summary. The Ranges are named Range1 through Range14 with Range 14 being the entire set of Details.
Here's what I need. I need to reset the first Macro so that when it is fired, it will be fired when all of the details are open. That is to say, none of the individual ranges are showing "individually".
That's it! I'm thinking its one or two lines in the beginning of the first Macro to reset it.
Thank you in advance,
Private Sub CommandButton1_Click()
If CommandButton1.Caption = "Summary" Then
'Your two macros look the same to me except for the name, but
'reguardless you would put the name of the one that you want to
'run when the caption says "Expand" here
CommandButton1.Caption = "Input"
CommandButton1.Caption = "Summary"
Private Sub CommandButton2_Click()
Const NoOfRanges = 14
Static CurrentRange As Long
Dim I As Long
Application.ScreenUpdating = False
CurrentRange = (CurrentRange + 1) Mod (NoOfRanges + 1)
For I = 1 To NoOfRanges
Range("Range" & I).EntireRow.Hidden = CurrentRange <> 0
If CurrentRange <> 0 Then
Range("Range" & CurrentRange).EntireRow.Hidden = False
Application.ScreenUpdating = True