Mackeral
Board Regular
- Joined
- Mar 7, 2015
- Messages
- 249
- Office Version
- 365
- Platform
- Windows
I'm using an example: Created the form, written some code, put the Command button on a sheet - but _
when I clock on it, the Form appears and then disappears. I have "Stop" commands at the beginning of every routine.
I click on the prompt button, it goes into the selection/Load program and shows the UserForm, but after a few seconds it usually closes the User Form and leaves VBA in "running" mode. But once it actually did stop in the processing routine.
The calling code is
And thsi first code it would go into processing the User form is
Any idea what's going on?
Thanks, Mac
when I clock on it, the Form appears and then disappears. I have "Stop" commands at the beginning of every routine.
I click on the prompt button, it goes into the selection/Load program and shows the UserForm, but after a few seconds it usually closes the User Form and leaves VBA in "running" mode. But once it actually did stop in the processing routine.
The calling code is
VBA Code:
Sub CommandButton1_Click()
Stop
ufGetData.Show
End Sub
And thsi first code it would go into processing the User form is
VBA Code:
Sub cmdOk_Click()
Stop
Dim wf As WorksheetFun
wf = Application.WorksheetFunction
' Make sure a name is entered.
If Len(Me.tbxName.Text) = 0 Then
MsgBox "You must enter a name."
Me.tbxName.SetFocus
Else
Next_Row = wf.ConttA(Sheets("Test").Range("A:A")) + 1
' Clear codes.
Me.tbxName.Text = ""
Me.OptUnknown.Vale = True
Me.tbxName = SetFocus
End If
Stop
End Sub
Any idea what's going on?
Thanks, Mac