White_Nova
02-06-2008, 04:23 AM
Hi All
Im using the following code to email a workbook to a select group if recipients.
The problem is that when i run the macro Microsift pops up with a message saying the following:
"A Program is trying to send an e-mail message on your behalf. If this is unexpected, click Deny and verify your antivirus software is up-to-date.
For more information about e-mail safety and how you might be able to avoid getting this warning, click help"
Ive clicked on help but it opens the basic help with no suggestions.
Please help!!!!!!
Sub Email()
Dim vtPath$
Dim vtSource$
Dim vtTarget$
'' Set up the source path
vtPath = ThisWorkbook.Path & "\Stats\"
'' Set up the target and source names
vtSource = vtPath & ctDb & ".xls"
vtTarget = vtPath & Format(Now, "ddhhmmss") & ".xls"
Sheets("Agent Summary").Select
Sheets("Agent Summary").Copy
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A2").Select
Application.CutCopyMode = False
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
vtTarget _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False, AccessMode:=xlNoChange, ConflictResolution:=Yes
Application.DisplayAlerts = False
ActiveWorkbook.SendMail ActiveSheet.Range("A48:A62").Value
End Sub
Im using the following code to email a workbook to a select group if recipients.
The problem is that when i run the macro Microsift pops up with a message saying the following:
"A Program is trying to send an e-mail message on your behalf. If this is unexpected, click Deny and verify your antivirus software is up-to-date.
For more information about e-mail safety and how you might be able to avoid getting this warning, click help"
Ive clicked on help but it opens the basic help with no suggestions.
Please help!!!!!!
Sub Email()
Dim vtPath$
Dim vtSource$
Dim vtTarget$
'' Set up the source path
vtPath = ThisWorkbook.Path & "\Stats\"
'' Set up the target and source names
vtSource = vtPath & ctDb & ".xls"
vtTarget = vtPath & Format(Now, "ddhhmmss") & ".xls"
Sheets("Agent Summary").Select
Sheets("Agent Summary").Copy
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A2").Select
Application.CutCopyMode = False
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
vtTarget _
, FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False, AccessMode:=xlNoChange, ConflictResolution:=Yes
Application.DisplayAlerts = False
ActiveWorkbook.SendMail ActiveSheet.Range("A48:A62").Value
End Sub