run a macro when clicking on "save as"

M

M K W

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
 
A

Andy Wiggins

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"
 
S

Sharad

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top