Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Call a program from Save As dialog

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Call a program from Save As dialog

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
autofilter dialog boxes - can i call this up in the Mr BT Excel Worksheet Functions 3 January 15th 09 09:23 PM
Call from a Main program Haim[_2_] Excel Programming 4 September 24th 04 08:09 PM
Getting hWnd for API call or Color choosing dialog Jeff[_31_] Excel Programming 13 June 5th 04 03:18 AM
Why system asks me to save change even after I call save method(VB.NET) steellock Excel Programming 2 April 27th 04 04:14 AM
API call to check other program is idle Keith Willshaw Excel Programming 0 August 15th 03 01:41 PM


All times are GMT +1. The time now is 01:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"