Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
I have been trying to manipulate the code given below to hide the rows and columns that begin with the number ZERO. But, I am landing into some sort of error. I know that the code given below works perfectly to hides any empty row and column. Can I know if there is any function or command button code that can be written to hide the rows and columns that begin with the number ZERO? (ZERO will be found both in column A and 1st row.) If yes, please help me with the code. In other words, when the user hits the command button, all the rows and columns that begin with 0 (ZERO) should be hidden. Thanks, Thulasiram. Private Sub Hide_Click() Dim SH As Worksheet Dim col As Range Dim rw As Range Set SH = ActiveSheet For Each col In SH.UsedRange.Columns col.Hidden = Application.CountA(col) = 0 Next col For Each rw In SH.UsedRange.Rows rw.Hidden = Application.CountA(rw) = 0 Next rw End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro code to hide rows and not calculate hidden rows | Excel Discussion (Misc queries) | |||
Enabling option „Format rows“ to hide/unhide rows using VBA-code? | Excel Discussion (Misc queries) | |||
vb code to hide columns | Excel Discussion (Misc queries) | |||
Code to Hide Rows | Excel Discussion (Misc queries) | |||
Hide columns code | Excel Discussion (Misc queries) |