I am trying to get a form module to call a "public sub" module, and keep getting a "Compile Error: Sub or Function not defined" Error, Any Ideas out there?
my looks like:
private sub cmdCreate_Click() ' This is the command for creating letter in the form module.
'lots of commands here
'ends with the following
Application.ScreenUpdating = True
Unload Send_to_information
Call EmailDocument
End Sub
Sub EmailDocument() ' ask to sent email. 'this is in a module
Dim intResponse As Integer
intResponse = MsgBox("Would you like to email this?", vbYesNo + vbQuestion + vbDefaultButton2, "Title")
If intResponse = vbYes Then
Call SendDocumentInMail
Else
MsgBox "Email NOT sent"
End If
End Sub
Private Sub SendDocumentInMail() ' starts email process
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
thanks for anyhelp...
my looks like:
private sub cmdCreate_Click() ' This is the command for creating letter in the form module.
'lots of commands here
'ends with the following
Application.ScreenUpdating = True
Unload Send_to_information
Call EmailDocument
End Sub
Sub EmailDocument() ' ask to sent email. 'this is in a module
Dim intResponse As Integer
intResponse = MsgBox("Would you like to email this?", vbYesNo + vbQuestion + vbDefaultButton2, "Title")
If intResponse = vbYes Then
Call SendDocumentInMail
Else
MsgBox "Email NOT sent"
End If
End Sub
Private Sub SendDocumentInMail() ' starts email process
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
thanks for anyhelp...