Mega Code Archive

 
Categories / VisualBasic Script / Forms
 

Determining the selected item

Private Sub OKButton_Click()       Dim Msg As String       Msg = "You selected item # "       Msg = Msg & ListBox1.ListIndex       Msg = Msg & vbNewLine       Msg = Msg & ListBox1.Value       MsgBox Msg       Unload UserForm1   End Sub