How take form based data entry back to main sub?
I just tried that and watched the value of LocID and it keeps the value
until the UNLOAD USERFORM1 command is ran and then I get 'out of
context' for that variable even with the public declaration of the
variables. See my code below. (It's very simple.) .. Thx!
Public Direction As String
Public DOW As String
Public LocID As String
Private Sub CommandButton2_Click()
End Sub
Private Sub OKButton_Click_Click()
Msg = "You selected Item # "
Msg = Msg & ListBox1.ListIndex
Msg = Msg & vbCrLf
Msg = Msg & ListBox1.Value
LocID = ListBox1.Value
MsgBox Msg
'Unload UserForm1
End Sub
Private Sub UserForm_Click()
End Sub
|