View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gungmas Gungmas is offline
external usenet poster
 
Posts: 2
Default Call a program from Save As dialog

Great, thanks for your speedy reply!

Gungmas

"Dave Peterson" wrote:

Excel has a workbook_beforesave event.

And you can use that to check to see if you're doing a SaveAs.

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

If SaveAsUI = True Then
Shell "C:\yourpath\yourExe.exe"
End If

End Sub

I don't know about other office programs. You may want to post in the specific
applications (word/ppt/access) for help--if you don't get it here.

Chip Pearson has a white paper at:
http://www.cpearson.com/excel/events.htm
You may want to take a look at it.

He also has a sample workbook that will show how the events fire (and in what
order) at:
http://www.cpearson.com/excel/download.htm
Look for EventSeq.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Gungmas wrote:

I would like to call another program from the Save As ... dialog in Excel
(and possible other Office programs too), does anybody know how to do that?
Appreciate any help.
Gungmas


--

Dave Peterson