View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Amit Shanker Amit Shanker is offline
external usenet poster
 
Posts: 25
Default Check status row (hidden or visible)?

Use this code : Rows("1:5").EntireRow.Hidden = Not
Rows("1:5").EntireRow.Hidden

Adjust row numbers in above line of code to suit your needs.

Amit


"Martin Los" wrote in message
...
How can I put both macros in 1?

I need a VBA line that checks whether lines are hidden or
not, something like:

Sub HOW_TO_DO?
If Rows(Range("I109:I115").Select) = Hidden Then
Show_Rows
Else
Hide_Rows
End If
ENd Sub

Private Sub Hide_Rows()
Range("I109:I115").Select
Selection.EntireRow.Hidden = True
Range("I116").Select
End Sub

Private Sub Show_Rows()
Range("I105:U116").Select
Selection.CopyPicture Appearance:=xlScreen,
Format:=xlPicture
End Sub

TIA

Martin