I have a user form that has five object buttons, objectbutton 1 to 5, in a frame. The form also has text boxes and control buttons. My problem is that I do not know how to ensure that one of the object buttons is selected. I assume that code is able to detect the missing information when the control button is clicked. I would then like a message saying that an object button has not been selected and the form to wait until one is selected. Please give me a start.
Secondly, I would like the initialize code to not focus on one text box. My code is
Sub UserForm_Initialize()
Dim ctl
For Each ctl In Me.Controls
If TypeOf ctl Is msforms.TextBox Then
ctl.Text = ""
End If
Next ctl
End Sub
This code clears the text boxes but leaves the cursor in tb1
Thanks for your assistance
Peter
Bookmarks