ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide/Unhide rows (https://www.excelbanter.com/excel-programming/329914-hide-unhide-rows.html)

lennyx2

Hide/Unhide rows
 
Hi,
New to VBA.
Want to unhide rows based on a YES or NO response.
Any help appreciated.
Bob

Datasort

Hide/Unhide rows
 
You will need to set the rows().hidden property to false.

Ask the user which row

vtemp = msgbox "which row do you want to unhide


Perform the hidden = false method
if isnumneric (vtemp) then
Rows(vtemp & ":" & vtemp ).Hidden = false


Regards,

Stewart Rogers

"lennyx2" wrote:

Hi,
New to VBA.
Want to unhide rows based on a YES or NO response.
Any help appreciated.
Bob


lennyx2

Hide/Unhide rows
 
Although your answer is most likely correct, i'm a bit confused with response
probably due to my limited knowledge of VBA. Can you give it another shot in
layman's terms? Thanks.

"Datasort" wrote:

You will need to set the rows().hidden property to false.

Ask the user which row

vtemp = msgbox "which row do you want to unhide


Perform the hidden = false method
if isnumneric (vtemp) then
Rows(vtemp & ":" & vtemp ).Hidden = false


Regards,

Stewart Rogers

"lennyx2" wrote:

Hi,
New to VBA.
Want to unhide rows based on a YES or NO response.
Any help appreciated.
Bob


Datasort

Hide/Unhide rows
 
Each column and row has a hidden property. You must change that property to
false if you want to display the row:

Example: Unhide row 2

Rows ("2:2").hidden = false

You asked for the ability of the user to tell you which row so I used a
message box to ask the user which row. See example below for the message box.


"lennyx2" wrote:

Although your answer is most likely correct, i'm a bit confused with response
probably due to my limited knowledge of VBA. Can you give it another shot in
layman's terms? Thanks.

"Datasort" wrote:

You will need to set the rows().hidden property to false.

Ask the user which row

vtemp = msgbox "which row do you want to unhide


Perform the hidden = false method
if isnumneric (vtemp) then
Rows(vtemp & ":" & vtemp ).Hidden = false


Regards,

Stewart Rogers

"lennyx2" wrote:

Hi,
New to VBA.
Want to unhide rows based on a YES or NO response.
Any help appreciated.
Bob



All times are GMT +1. The time now is 06:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com