G
Guest
Hi
I have a requirement of having a "Email Report" button on a worksheet. This button basically emails the active worksheet to the reciepents. I was able to get this feature to work but with some issues. The code that i am using i
Sub WorksheetOnlyEmail(
Dim Recip As Varian
Dim res
Dim inpresp As Strin
Dim impmsg, filename As Strin
resp = MsgBox("Have you entered the Team Name?", vbYesNo, "Team Information"
If resp = 6 The
'MsgBox "you have selected yes
inpmsg = "Please Enter the complete email addresses" & (Chr(13)) & " (eg (e-mail address removed)) and seperate multiple email id's by a "";""
inpresp = InputBox(inpmsg, "Email Information", "Email ID here"
filename = Worksheets("Report Out Pitch").Range("C1") & " YTD COQ Report" & Format(Date, "MMDDYY") & "-" & Format(Time(), "HHMMSS"
MsgBox filenam
If Len(inpresp) <> 0 The
'MsgBox inpres
If CheckIfEmailIDCorrect(inpresp) The
Recip = Array(inpresp)
Worksheets("Report Out Pitch").Cop
Application.DisplayAlerts = Fals
ActiveWorkbook.SaveAs filename:=filename & ".xls
ActiveWorkbook.SendMail Recipients:=Recip, Subject:=filename & "YTD COQ Report
ActiveWorkbook.Clos
Application.DisplayAlerts = Tru
End I
End I
ElseIf resp = 7 The
'MsgBox "You have selected No
End I
End Su
The issues are
The worksheet also has a button to print out a range. This button does not work does not work in the emailed version of the report
when i open the email sent, there is a message displayed saying that the worksheet has links to another worksheet and if i wanted to update it
How can i overcome these two issues?
Thanks in advanc
I have a requirement of having a "Email Report" button on a worksheet. This button basically emails the active worksheet to the reciepents. I was able to get this feature to work but with some issues. The code that i am using i
Sub WorksheetOnlyEmail(
Dim Recip As Varian
Dim res
Dim inpresp As Strin
Dim impmsg, filename As Strin
resp = MsgBox("Have you entered the Team Name?", vbYesNo, "Team Information"
If resp = 6 The
'MsgBox "you have selected yes
inpmsg = "Please Enter the complete email addresses" & (Chr(13)) & " (eg (e-mail address removed)) and seperate multiple email id's by a "";""
inpresp = InputBox(inpmsg, "Email Information", "Email ID here"
filename = Worksheets("Report Out Pitch").Range("C1") & " YTD COQ Report" & Format(Date, "MMDDYY") & "-" & Format(Time(), "HHMMSS"
MsgBox filenam
If Len(inpresp) <> 0 The
'MsgBox inpres
If CheckIfEmailIDCorrect(inpresp) The
Recip = Array(inpresp)
Worksheets("Report Out Pitch").Cop
Application.DisplayAlerts = Fals
ActiveWorkbook.SaveAs filename:=filename & ".xls
ActiveWorkbook.SendMail Recipients:=Recip, Subject:=filename & "YTD COQ Report
ActiveWorkbook.Clos
Application.DisplayAlerts = Tru
End I
End I
ElseIf resp = 7 The
'MsgBox "You have selected No
End I
End Su
The issues are
The worksheet also has a button to print out a range. This button does not work does not work in the emailed version of the report
when i open the email sent, there is a message displayed saying that the worksheet has links to another worksheet and if i wanted to update it
How can i overcome these two issues?
Thanks in advanc