Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
RLY RLY is offline
external usenet poster
 
Posts: 7
Default Macro to Unhide Rows

Need help with an excel 2003 macro to simply unhide a certain number of rows
in a spreadsheet (# of rows to be unhidden is based on user input).
Here's what I have & it's not working...

With Sheets("Inputs").Select
X = Range("U2")
Y = Range("X2")
Rows("X:Y", 0).Select
Range("Y").Activate
Selection.EntireRow.Hidden = False
End With

U2 is a fixed entry, the row # in X2 is calculated based on a user input (#
of additional rows required).
Thanks, Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Macro to Unhide Rows

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

If this post helps click Yes
---------------
Jacob Skaria


"RLY" wrote:

Need help with an excel 2003 macro to simply unhide a certain number of rows
in a spreadsheet (# of rows to be unhidden is based on user input).
Here's what I have & it's not working...

With Sheets("Inputs").Select
X = Range("U2")
Y = Range("X2")
Rows("X:Y", 0).Select
Range("Y").Activate
Selection.EntireRow.Hidden = False
End With

U2 is a fixed entry, the row # in X2 is calculated based on a user input (#
of additional rows required).
Thanks, Robert

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro to Unhide Rows

With Sheets("Inputs")
X = .Range("U2").value
Y = .Range("X2").value
.Rows(x & ":" & y).hidden = False
End With


RLY wrote:

Need help with an excel 2003 macro to simply unhide a certain number of rows
in a spreadsheet (# of rows to be unhidden is based on user input).
Here's what I have & it's not working...

With Sheets("Inputs").Select
X = Range("U2")
Y = Range("X2")
Rows("X:Y", 0).Select
Range("Y").Activate
Selection.EntireRow.Hidden = False
End With

U2 is a fixed entry, the row # in X2 is calculated based on a user input (#
of additional rows required).
Thanks, Robert


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
RLY RLY is offline
external usenet poster
 
Posts: 7
Default Macro to Unhide Rows

That sure works - Thank You!

"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

If this post helps click Yes
---------------
Jacob Skaria


"RLY" wrote:

Need help with an excel 2003 macro to simply unhide a certain number of rows
in a spreadsheet (# of rows to be unhidden is based on user input).
Here's what I have & it's not working...

With Sheets("Inputs").Select
X = Range("U2")
Y = Range("X2")
Rows("X:Y", 0).Select
Range("Y").Activate
Selection.EntireRow.Hidden = False
End With

U2 is a fixed entry, the row # in X2 is calculated based on a user input (#
of additional rows required).
Thanks, Robert

  #5   Report Post  
Posted to microsoft.public.excel.programming
RLY RLY is offline
external usenet poster
 
Posts: 7
Default Macro to Unhide Rows

One more issue:
The max # of additional rows that can be unhidden is 16. How can I apply
this limit within the macro (if the user enters "17" an error will occur)...?
Thank You.


"RLY" wrote:

That sure works - Thank You!

"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

If this post helps click Yes
---------------
Jacob Skaria


"RLY" wrote:

Need help with an excel 2003 macro to simply unhide a certain number of rows
in a spreadsheet (# of rows to be unhidden is based on user input).
Here's what I have & it's not working...

With Sheets("Inputs").Select
X = Range("U2")
Y = Range("X2")
Rows("X:Y", 0).Select
Range("Y").Activate
Selection.EntireRow.Hidden = False
End With

U2 is a fixed entry, the row # in X2 is calculated based on a user input (#
of additional rows required).
Thanks, Robert

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
Code to Unhide Rows using Macro Rajat Excel Worksheet Functions 7 January 14th 10 06:56 PM
Can you hide and unhide rows with a macro based on content of colu Husker87 Excel Programming 4 September 24th 08 01:06 AM
unhide row does not unhide the hidden rows nikita Excel Worksheet Functions 4 May 24th 08 02:59 PM
Macro that will unhide then hide rows minka Excel Discussion (Misc queries) 10 October 21st 06 01:37 PM
How do I hide or unhide zero value columns/rows USING A MACRO? paul Excel Discussion (Misc queries) 1 January 23rd 06 03:06 PM


All times are GMT +1. The time now is 12:49 PM.

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

About Us

"It's about Microsoft Excel"