Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default Select Option button unhide row

Hello in Row 33 I have two option buttons created using control tool
box. What I want to do is if the second option button is selected to unhide
rows 34 thru 36. thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Select Option button unhide row

Try using the following line of code:

Rows("34:36").EntireRow.Hidden = False

--
Kevin Backmann


"Wanna Learn" wrote:

Hello in Row 33 I have two option buttons created using control tool
box. What I want to do is if the second option button is selected to unhide
rows 34 thru 36. thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default Select Option button unhide row

Thanks Kevin I must be doing something wrong . it does not work. please
clarify thanks

"Kevin B" wrote:

Try using the following line of code:

Rows("34:36").EntireRow.Hidden = False

--
Kevin Backmann


"Wanna Learn" wrote:

Hello in Row 33 I have two option buttons created using control tool
box. What I want to do is if the second option button is selected to unhide
rows 34 thru 36. thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Select Option button unhide row

Try this.

Press Alt + F11 to open the VBE, click INSERT on the menu and select MODULE.

In the new Module enter the following sub, changing the worksheet index
number to the sheet you want to unhide the rows in. You can also use the
name as as string Sheets("WorksheetName")

Sub Unhide()

Dim ws As Worksheet

Set ws = ThisWorkbook.Sheets(1)

ws.Rows("34:36").EntireRow.Hidden = False

Set ws = Nothing

End Sub

Click file in the menu and select CLOSE AND RETURN TO EXCEL.

In the worksheet where the button is located, open the CONTROL TOOLBOX
toolbar and click the DESIGN MODE button. Right click the command button and
select VIEW CODE and enter the name of sub UNHIDE, without parenthesis.

Click file in the menu and select CLOSE AND RETURN TO EXCEL.

Turn DESIGN MODE off, save your workbook and give it a test drive
--
Kevin Backmann


"Wanna Learn" wrote:

Thanks Kevin I must be doing something wrong . it does not work. please
clarify thanks

"Kevin B" wrote:

Try using the following line of code:

Rows("34:36").EntireRow.Hidden = False

--
Kevin Backmann


"Wanna Learn" wrote:

Hello in Row 33 I have two option buttons created using control tool
box. What I want to do is if the second option button is selected to unhide
rows 34 thru 36. thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default Select Option button unhide row

Again Thanks - forgive my ignorance.. the name of the worksheet is Form.
exactly where do I enter the name of the sheet Thsnks again

"Kevin B" wrote:

Try this.

Press Alt + F11 to open the VBE, click INSERT on the menu and select MODULE.

In the new Module enter the following sub, changing the worksheet index
number to the sheet you want to unhide the rows in. You can also use the
name as as string Sheets("WorksheetName")

Sub Unhide()

Dim ws As Worksheet

Set ws = ThisWorkbook.Sheets(1)

ws.Rows("34:36").EntireRow.Hidden = False

Set ws = Nothing

End Sub

Click file in the menu and select CLOSE AND RETURN TO EXCEL.

In the worksheet where the button is located, open the CONTROL TOOLBOX
toolbar and click the DESIGN MODE button. Right click the command button and
select VIEW CODE and enter the name of sub UNHIDE, without parenthesis.

Click file in the menu and select CLOSE AND RETURN TO EXCEL.

Turn DESIGN MODE off, save your workbook and give it a test drive
--
Kevin Backmann


"Wanna Learn" wrote:

Thanks Kevin I must be doing something wrong . it does not work. please
clarify thanks

"Kevin B" wrote:

Try using the following line of code:

Rows("34:36").EntireRow.Hidden = False

--
Kevin Backmann


"Wanna Learn" wrote:

Hello in Row 33 I have two option buttons created using control tool
box. What I want to do is if the second option button is selected to unhide
rows 34 thru 36. thanks



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Select Option button unhide row

Set ws = ThisWorkbook.Sheets("Form")

Wanna Learn wrote:

Again Thanks - forgive my ignorance.. the name of the worksheet is Form.
exactly where do I enter the name of the sheet Thsnks again

"Kevin B" wrote:

Try this.

Press Alt + F11 to open the VBE, click INSERT on the menu and select MODULE.

In the new Module enter the following sub, changing the worksheet index
number to the sheet you want to unhide the rows in. You can also use the
name as as string Sheets("WorksheetName")

Sub Unhide()

Dim ws As Worksheet

Set ws = ThisWorkbook.Sheets(1)

ws.Rows("34:36").EntireRow.Hidden = False

Set ws = Nothing

End Sub

Click file in the menu and select CLOSE AND RETURN TO EXCEL.

In the worksheet where the button is located, open the CONTROL TOOLBOX
toolbar and click the DESIGN MODE button. Right click the command button and
select VIEW CODE and enter the name of sub UNHIDE, without parenthesis.

Click file in the menu and select CLOSE AND RETURN TO EXCEL.

Turn DESIGN MODE off, save your workbook and give it a test drive
--
Kevin Backmann


"Wanna Learn" wrote:

Thanks Kevin I must be doing something wrong . it does not work. please
clarify thanks

"Kevin B" wrote:

Try using the following line of code:

Rows("34:36").EntireRow.Hidden = False

--
Kevin Backmann


"Wanna Learn" wrote:

Hello in Row 33 I have two option buttons created using control tool
box. What I want to do is if the second option button is selected to unhide
rows 34 thru 36. thanks


--

Dave Peterson
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
How to Disable Unhide Sheet menu option contactf Excel Worksheet Functions 8 September 25th 07 07:42 PM
hide or unhide rows with button Bea Excel Discussion (Misc queries) 15 September 19th 07 07:03 PM
Using Hide, Unhide, and auto filter - select all on a protected sh Pattie Excel Worksheet Functions 1 July 7th 06 04:47 PM
Hide/Unhide Option - Need to consider all options! Turquoise_dax Excel Discussion (Misc queries) 3 June 15th 06 09:17 PM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM


All times are GMT +1. The time now is 09:02 PM.

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

About Us

"It's about Microsoft Excel"