mmetzinger
Board Regular
- Joined
- Dec 30, 2010
- Messages
- 61
Ok, I have never done anything with On Error before so please view me as a total newb in that regard. What I am trying to figure out is if I have a main Sub that is then calling a user form that then calls a private sub do I only need the On Error statement in the start Sub?
Here is the basic layout to my code minus the meat as their is a lot:
This then goes to the userform and after the user makes their selection it returns to the next private sub
There are multiple forms and private subs so this is just the first small bit.
What I want is an On Error statement that simply tells the user to contact the IT department if the macro errors out at all and then closes some reference workbooks that it may have opened.
Any ideas?
Here is the basic layout to my code minus the meat as their is a lot:
Code:
Option Compare Text
Public SelectedAccount As String
Public Accountcell As String
Public CensusType As String
Public ShortName As String
Public emailto As String
Sub CRM_Check_Account()
CensusTypeForm.Show
End Sub
This then goes to the userform and after the user makes their selection it returns to the next private sub
Code:
Private Sub CRM_Check_Cont()
AccountsForm.Show
End Sub
There are multiple forms and private subs so this is just the first small bit.
What I want is an On Error statement that simply tells the user to contact the IT department if the macro errors out at all and then closes some reference workbooks that it may have opened.
Any ideas?