ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   run a macro when clicking on "save as" (https://www.excelbanter.com/excel-programming/275948-run-macro-when-clicking-save.html)

M K W

run a macro when clicking on "save as"
 
Hello,
How to run a macro when I click on Save As?
When I click on "save as" I want a macro to run, do something, then the
"save as" will take place and the save as window appears.
thanx in advance



Andy Wiggins[_2_]

run a macro when clicking on "save as"
 
In "Thisworkbook", take a look at the BeforeSave event:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)

End Sub

--

Regards
Andy Wiggins
www.BygSoftware.com
Home of "The Excel Auditor" and "Byg Tools for VBA"



"M K W" wrote in message
...
Hello,
How to run a macro when I click on Save As?
When I click on "save as" I want a macro to run, do something, then the
"save as" will take place and the save as window appears.
thanx in advance





Sharad

run a macro when clicking on "save as"
 
Before_save can be used. In case the file is saveasUi
variable will be true if you are saving it the first time
or you are doing a Save As event.

Regards
Sharad.



-----Original Message-----
Hello,
How to run a macro when I click on Save As?
When I click on "save as" I want a macro to run, do

something, then the
"save as" will take place and the save as window appears.
thanx in advance


.



All times are GMT +1. The time now is 08:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com