Results 1 to 5 of 5

Thread: UserForm help, assigning variable from option button selection

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    VBAX Tutor david000's Avatar
    Joined
    Mar 2007
    Location
    Chicago
    Posts
    276
    Location

    Do you need option buttons?

    you could switch to a listbox or a combobox and get away easier.

    Private Sub UserForm_Initialize()
        Dim i As Integer
        With Me.ComboBox1
            For i = 1 To 12
                .AddItem MonthName(i)
            Next i
        End With
    End Sub
    
    Private Sub ComboBox1_Change()
        MsgBox ComboBox1.Value
    End Sub
    Last edited by Aussiebear; 04-19-2025 at 10:09 PM.

Posting Permissions

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