+ Reply to Thread
Results 1 to 7 of 7

UserForm

Hybrid View

  1. #1
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Try something like this.

    Private Sub CommandButton2_Click():
    
    Dim LastRow As Range
    Dim strVal As String
      For i = 1 To 20
        If UserForm1.Controls("combobox" & i).Value = "" Then
          MsgBox "Please fill in all options"
          Exit Sub
        End If
      Next i
    I've just put in the start of the module so you can see its position.

    rylo

  2. #2
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118
    thats perfect mate...

    you a star... ive used it so the combo box is filled and the textbox field....

    for each combo box there are 3 values to select 'Yes', 'No' and 'N/A'

    when i press Y on the keyboard, it changes the combo box to Yes, when the N button is pushed its changes it to No, how can i assign a different character on the keyboard so 'N/A' can be selected in the combo box... like the letter 'A'

    thanks

  3. #3
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Only thing I can think of is to change "N/A" to " N/A". You can then use a space bar to select.

    When the data is being output, you could remove the leading space (TRIM function) or replace when the output is completed.

    rylo

  4. #4
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118
    thanks mate

+ Reply to Thread

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