![]() |
Email notification
I have a "Personal.xls" macro which I run up to and including the following
|SaveAs| ActiveWorkbook.SaveAs Filename:="\\cav-new\files\diur" & Mid(MyValue, 4, 2) & Right(MyValue, 2) & ".csv", FileFormat:=xlCSV Up to this point the Macro works just fine. Now I want to notify someone via email that the file has been saved in the particular directory. I thought I could use the following: Application.Run "'" & ActiveWorkbook.Name & "'!Mail_Selection_Outlook_Body" However, this is trying to run the "Mail_Selection_Outlook_Body" from the saved file which is by now called "diur0107" and not from the "Personal.xls" module. how do I change the Application.Run command to run from the Personal.xls? something like: Application.Run "'" & Personal.xls & "'!Mail_Selection_Outlook_Body" ??????? but something doesn't work right...help thanks |
Email notification
To run a macro in my Personal all I need is this:
Run "Personal.xls!ToggleScrollBars" -- Jim "Helmut" wrote in message ... I have a "Personal.xls" macro which I run up to and including the following |SaveAs| ActiveWorkbook.SaveAs Filename:="\\cav-new\files\diur" & Mid(MyValue, 4, 2) & Right(MyValue, 2) & ".csv", FileFormat:=xlCSV Up to this point the Macro works just fine. Now I want to notify someone via email that the file has been saved in the particular directory. I thought I could use the following: Application.Run "'" & ActiveWorkbook.Name & "'!Mail_Selection_Outlook_Body" However, this is trying to run the "Mail_Selection_Outlook_Body" from the saved file which is by now called "diur0107" and not from the "Personal.xls" module. how do I change the Application.Run command to run from the Personal.xls? something like: Application.Run "'" & Personal.xls & "'!Mail_Selection_Outlook_Body" ??????? but something doesn't work right...help thanks |
All times are GMT +1. The time now is 07:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com