userform frame control

  • Thread starter Thread starter Jo
  • Start date Start date
J

Jo

Hi
I am trying to use a userform with 2 frames. On the
intialize I would like frame2 to be all disable then on
clicking frame1 be enable.
Help!!!
This code below does not work.
Thanks in advance
Jo

Private Sub UserForm2_Initialize()
Frame2.Controls = False
End Sub
 
Hi
I cannot get this to work. May be I am asking the wrong
question.
I would like frame2 and all the option buttons within the
frame 'greyed out'.
I have the form linked to a commed button with the
following code
Private Sub CommandButton2_Click()
UserForm2.show
End Sub
does this overide the intialize event?
Thanks again
Jo
 
Private Sub Frame1_Click()
Frame2.Enabled = True
Dim ctrl As Control
For Each ctrl In Frame2.Controls
ctrl.Enabled = True
Next
End Sub

Private Sub UserForm_Initialize()
Dim ctrl As Control
Frame2.Enabled = False
For Each ctrl In Frame2.Controls
ctrl.Enabled = False
Next
End Sub
 
Back
Top