hibiscus27
04-19-2007, 12:14 PM
Hello
I have the following code attached to a button. Once clicked it is supposed to open up an outlook email message.
I'm getting notices from users that when they click on the button, two messages end up being emailed instead of 1. Can you take a look at tell me why? Thanks!!!
'***** Open a new email with project attached to send to next person
Private Sub btnSendNext_Click()
MsgBox "On the next screen, you will see a mail message created with the approval request attached." & Chr(10) & _
"Please address it to the Saltillo Quality Engineer and click the send button."
Application.Dialogs(xlDialogSendMail).Show arg1:="", arg2:="Process Approval Request " & ActiveSheet.Range("B12").Value & " - form needs review. Sign and submit for JAX review."
Dim originator As Variant
originator = ActiveSheet.Range("B8").Value
If originator = Null Then
Dim originator1 As Variant
originator1 = ActiveSheet.Range("B8").Value
Exit Sub
End If
ActiveWorkbook.SendMail Recipients:=originator, Subject:="Process Approval Request " & ActiveSheet.Range("B12").Value & " - forwarded for next approval"
Application.DisplayAlerts = False
ActiveWorkbook.Close savechanges:=False, routeworkbook:=False
End Sub
I have the following code attached to a button. Once clicked it is supposed to open up an outlook email message.
I'm getting notices from users that when they click on the button, two messages end up being emailed instead of 1. Can you take a look at tell me why? Thanks!!!
'***** Open a new email with project attached to send to next person
Private Sub btnSendNext_Click()
MsgBox "On the next screen, you will see a mail message created with the approval request attached." & Chr(10) & _
"Please address it to the Saltillo Quality Engineer and click the send button."
Application.Dialogs(xlDialogSendMail).Show arg1:="", arg2:="Process Approval Request " & ActiveSheet.Range("B12").Value & " - form needs review. Sign and submit for JAX review."
Dim originator As Variant
originator = ActiveSheet.Range("B8").Value
If originator = Null Then
Dim originator1 As Variant
originator1 = ActiveSheet.Range("B8").Value
Exit Sub
End If
ActiveWorkbook.SendMail Recipients:=originator, Subject:="Process Approval Request " & ActiveSheet.Range("B12").Value & " - forwarded for next approval"
Application.DisplayAlerts = False
ActiveWorkbook.Close savechanges:=False, routeworkbook:=False
End Sub