View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Run Two Macros from Same Button

You need only a single procedure.

Sub SwitchView()
With ActiveSheet.Range("B:D").EntireColumn
.Hidden = Not .Hidden
End With
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"Exceller" wrote in message
...
I've searched the archives here but have not found a suitable answer for
this.
I want to be able to execute two commands from the same button.
When the button is pressed once Columns B:D are hidden and when the button
is pressed again Columns B:D are unhidden.

Here's the basic macro I've recorded.

Columns("B:D").Select
Selection.EntireColumn.Hidden = True
End Sub

Columns("B:D").Select
Selection.EntireColumn.Hidden = False
End Sub

Any help would be much appreciated.

Thank you.