Hi everyone,
I want to show and hide rows by clicking on option buttons embedded in an ActiveX Microsoft Forms 2.0 Frame Control. Please see this screenshot:
screen01.gif
This is my first time experimenting with the Visual Basic editor in Excel 2007. What I have pieced-together so far is from various google searches in an attempt to figure things out but it is not working. Here is my code:
Option Explicit
Private Sub MissionButtons_Click()
End Sub
Private Sub ISS_Click()
ISS.Value = True
Rows(5).EntireRow.Hidden = False
Rows(6).EntireRow.Hidden = False
Rows(8).EntireRow.Hidden = True
Rows(9).EntireRow.Hidden = True
Rows(11).EntireRow.Hidden = True
Rows(12).EntireRow.Hidden = True
End Sub
Private Sub Moon_Click()
Moon.Value = True
Rows(5).EntireRow.Hidden = True
Rows(6).EntireRow.Hidden = True
Rows(8).EntireRow.Hidden = False
Rows(9).EntireRow.Hidden = False
Rows(11).EntireRow.Hidden = True
Rows(12).EntireRow.Hidden = True
End Sub
Private Sub Mars_Click()
Mars.Value = True
Rows(5).EntireRow.Hidden = True
Rows(6).EntireRow.Hidden = True
Rows(8).EntireRow.Hidden = True
Rows(9).EntireRow.Hidden = True
Rows(11).EntireRow.Hidden = False
Rows(12).EntireRow.Hidden = False
End Sub
My biggest hurdle is that I do not understand properly how to give each option button a command while they are inside a Microsoft Forms 2.0 Frame Control.
Thank you all very much for your time and help.
Sincerely,
Chris
Bookmarks