Select Option button unhide row

  • Thread starter Thread starter Wanna Learn
  • Start date Start date
W

Wanna Learn

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
 
Thanks Kevin I must be doing something wrong . it does not work. please
clarify thanks
 
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
 
Again Thanks - forgive my ignorance.. the name of the worksheet is Form.
exactly where do I enter the name of the sheet Thsnks again
 
Set ws = ThisWorkbook.Sheets("Form")

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top