![]() |
Answer an Outlook Express message box
I have some VBL code that copies a specific worksheet from a workbook then
emails it. Is it possible to alter the code to answer an Outlook Express message box that asks if I want to send the message This the code that works well, except for the box that comes up Kill "C:\Documents and Settings\Compaq_Administrator\My Documents\Pay Slips\Book2.xls" Sheets("Pay Slip").Visible = True Sheets("Pay Slip").Select Sheets("Pay Slip").Copy Range("A1:G17").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("a1").Select ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\Compaq_Administrator\My Documents\Pay Slips\Book2.xls", _ FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False ActiveWorkbook.SendMail ", Subject:="Hi" ActiveWorkbook.Close SaveChanges:=False Sheets("Pay Slip").Select Sheets("Pay Slip").Visible = False |
Answer an Outlook Express message box
Hi ozhunter
See http://www.rondebruin.nl/mail/prevent.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "ozhunter" wrote in message ... I have some VBL code that copies a specific worksheet from a workbook then emails it. Is it possible to alter the code to answer an Outlook Express message box that asks if I want to send the message This the code that works well, except for the box that comes up Kill "C:\Documents and Settings\Compaq_Administrator\My Documents\Pay Slips\Book2.xls" Sheets("Pay Slip").Visible = True Sheets("Pay Slip").Select Sheets("Pay Slip").Copy Range("A1:G17").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("a1").Select ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\Compaq_Administrator\My Documents\Pay Slips\Book2.xls", _ FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False ActiveWorkbook.SendMail ", Subject:="Hi" ActiveWorkbook.Close SaveChanges:=False Sheets("Pay Slip").Select Sheets("Pay Slip").Visible = False |
All times are GMT +1. The time now is 10:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com