Results 1 to 2 of 2

continue after object button has been selected

Threaded View

  1. #1
    Registered User
    Join Date
    11-12-2011
    Location
    Mooloolaba,Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    continue after object button has been selected

    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
    Last edited by PeterYenroc; 11-14-2011 at 06:17 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1