TFCJamieFay
Active Member
- Joined
- Oct 3, 2007
- Messages
- 480
Hi Guys,
I'm trying to call a sub called "ValidateApp", stored in a module called "ValidateApp" with the following code...
...the problem is however that I get an error on the line...
...saying that the macro cannot be found. The "Private Sub SubmitBtn_Click" is ran from a user form with a command button.
I have recently moved the code to a new module, which is probably the cause but what can I change so it now knows where to look? If it's any help the old module was called "SecondaryCode".
Many thanks,
Jay
I'm trying to call a sub called "ValidateApp", stored in a module called "ValidateApp" with the following code...
Code:
Private Sub SubmitBtn_Click()
msg = MsgBox("Are you sure you want to submit this application?", vbYesNo + vbExclamation, _
"Warning!")
If msg = vbNo Then
TrackerForm.MainNameTBx.SetFocus
Else
Application.Run "ValidateApp"
End If
End Sub
...the problem is however that I get an error on the line...
Code:
Application.Run "ValidateApp"
...saying that the macro cannot be found. The "Private Sub SubmitBtn_Click" is ran from a user form with a command button.
I have recently moved the code to a new module, which is probably the cause but what can I change so it now knows where to look? If it's any help the old module was called "SecondaryCode".
Many thanks,
Jay