![]() |
Macro for Show/Hide Column
worked well. chose this one.
"tjtjjtjt" wrote: Here's a basic macro that will do it: Sub HideColD() Columns("D:D").Select If Selection.EntireColumn.Hidden = False Then Selection.EntireColumn.Hidden = True Else Selection.EntireColumn.Hidden = False End If Range("D1").Select End Sub tj "Andy" wrote: Hi I am trying to write a Macro to Toggle Show/Hide column D Anybody able to help? with thanks...Andy |
hi don, i used this for another column requirement....thanks
"Don Guillett" wrote: or Sub togglehide() columns("d").Entirecolumn.Hidden = True = Not _ columns("d").Entirecolumn.Hidden = True End Sub -- Don Guillett SalesAid Software "tjtjjtjt" wrote in message ... Here's a basic macro that will do it: Sub HideColD() Columns("D:D").Select If Selection.EntireColumn.Hidden = False Then Selection.EntireColumn.Hidden = True Else Selection.EntireColumn.Hidden = False End If Range("D1").Select End Sub tj "Andy" wrote: Hi I am trying to write a Macro to Toggle Show/Hide column D Anybody able to help? with thanks...Andy |
Why? All 3 did the same thing and Bob's was the most efficient.
-- Don Guillett SalesAid Software "Andy" wrote in message ... worked well. chose this one. "tjtjjtjt" wrote: Here's a basic macro that will do it: Sub HideColD() Columns("D:D").Select If Selection.EntireColumn.Hidden = False Then Selection.EntireColumn.Hidden = True Else Selection.EntireColumn.Hidden = False End If Range("D1").Select End Sub tj "Andy" wrote: Hi I am trying to write a Macro to Toggle Show/Hide column D Anybody able to help? with thanks...Andy |
All times are GMT +1. The time now is 12:53 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com