Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
PaulM
 
Posts: n/a
Default

That's great! Thanks, saved me a major headache!

"swatsp0p" wrote:

For some reason, my post via Joseph Rubin's newsgroup did not make it to here.

Assuming your worksheet is nameed "Sheet1" (edit as needed), create your
button and add this code to your button: verify the columns listed match your
desired ones to hide!

-----------------------

Sub hidecolsrow4()
' hidecolsrow4 Macro
If Worksheets("Sheet1").Columns("J").Hidden = False Then
Range("J:J,L:L,N:N,P:P,R:R,T:T,V:V,X:X,Z:Z,AB:AB,A D:AD,AF :AF,AH:AH").Select
Selection.EntireColumn.Hidden = True
Range("A4").Activate
Selection.EntireRow.Hidden = True
' unhidecolsrow4 Macro
Else
Rows("3:5").Select
Selection.EntireRow.Hidden = False
Columns("I:AI").Select
Selection.EntireColumn.Hidden = False
End If
Range("A1").Select
End Sub

----------------------------

If columns are hidden, this will Unhide them, if not hidden, it will Hide
them.

Good Luck
__________________
Bruce
The older I get, the better I used to be.
Minneapolis, MN USA



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to hide rows in a protected sheet Prakash Excel Worksheet Functions 7 January 18th 05 02:42 PM
Convert multiple columns to rows Lois Lane Excel Worksheet Functions 8 January 10th 05 12:47 AM
Unhide rows [email protected] Excel Discussion (Misc queries) 3 December 14th 04 05:28 PM
interchange columns with rows Herman Excel Discussion (Misc queries) 2 December 8th 04 05:40 PM
Checkbox to hide and unhide rows Please. Steved Excel Worksheet Functions 2 December 6th 04 11:30 PM


All times are GMT +1. The time now is 08:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"