fix switch view....

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
J

J.W. Aldridge

Need two columns to be hidden based on macro button.
I got the following formula from a previous question and adapted it by
adding a second column (L:L) to fit my needs but it only does L:L and
not K:K

Any help?

Sub SwitchView()
With ActiveSheet.Range("K:K,L:L").EntireColumn
.Hidden = Not .Hidden
End With
End Sub


thanx
 
Use it like this

Sub SwitchView()
With ActiveSheet.Range("K:L").EntireColumn
.Hidden = Not .Hidden
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top