View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RLY RLY is offline
external usenet poster
 
Posts: 7
Default How to limit "Unhide Rows" Macro?

The "unhide additional rows" macro provided by Jacob works great (below), but
I need to limit the # of rows affected. The max # of additional rows
available is 16, if the user enters "17" an error will occur. How can I apply
this limit?

Thank You, Robert

"Jacob Skaria" wrote:


With Sheets("Inputs").Select
x = Range("U2")
Y = Range("X2")
Rows(x & ":" & Y).EntireRow.Hidden = False
Range("A" & Y).Activate
End With