userform frame control
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
--
Regards,
Tom Ogilvy
Jo wrote in message
...
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
-----Original Message-----
One possibility:
Private Sub Frame1_Click()
Frame2.Enabled = True
End Sub
Private Sub UserForm_Initialize()
Frame2.Enabled = False
End Sub
This actually requires a click on the frame1, not on a
control in frame1.
Alter to suit your needs.
--
Regards,
Tom Ogilvy
o wrote in message
...
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
.
|