Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Catch FileSave/Save As/etc...

In Word VBA, I can write a

sub FileSave()

or

sub FileSaveAs()

to intercept the file menu "Save" and "Save As..." items and do some
processing prior to the save. What is the analogous method in Excel VBA?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Catch FileSave/Save As/etc...

There isn't one. You can remove the menu item and replace it with your own,
us onkeys to remap and shortcut keys and so forth.

--
Regards,
Tom Ogilvy



"Sonny Maou" wrote in message
...
In Word VBA, I can write a

sub FileSave()

or

sub FileSaveAs()

to intercept the file menu "Save" and "Save As..." items and do some
processing prior to the save. What is the analogous method in Excel VBA?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Catch FileSave/Save As/etc...

Tom Ogilvy wrote:

There isn't one. You can remove the menu item and replace it with your own,
us onkeys to remap and shortcut keys and so forth.


Why? Why? Why?!?! Does the left hand not know what the right hand is
doing at Mickeysoft?!?! Okay, so Microslop said "Why make it easy?" All
right... let's deal with it.

Is there a library out there already done? I would hate to have to
reinvent the wheel. :)

If not, is it possible to make a customMenu class and then do something
like this:

customMenu.Replace cMWhat:="FileNew", cMWith:="FileNew",
cMCode="myFileNewSub"

Then I'd have to reprogram the keystrokes, right?

<pulling hair out

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Catch FileSave/Save As/etc...

There is a beforesave event

http://www.cpearson.com/excel/events.htm

Chip Pearson's page on events.

--
Regards,
Tom Ogilvy

"Sonny Maou" wrote in message
...
In Word VBA, I can write a

sub FileSave()

or

sub FileSaveAs()

to intercept the file menu "Save" and "Save As..." items and do some
processing prior to the save. What is the analogous method in Excel VBA?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Catch FileSave/Save As/etc...

Tom Ogilvy wrote:
There is a beforesave event

http://www.cpearson.com/excel/events.htm

Chip Pearson's page on events.


That was very helpful. Thanks, Tom!



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
SAVE and SAVE AS options disappeared from the drop down FILE menu [email protected] Excel Discussion (Misc queries) 2 July 12th 07 09:14 AM
when i save xls file, debug script is running and canno't save fil Imtiaz Excel Discussion (Misc queries) 1 July 16th 05 03:47 PM
Save & Save As features in file menu of Excel Blue Excel Discussion (Misc queries) 9 December 27th 04 08:49 PM
Save Excel file - prompts to save - no Volitile functions used POWER CERTS Excel Worksheet Functions 2 November 1st 04 09:27 PM
Save As - Multiple Sheets fails to save as text file Ravee Srinivasan Excel Programming 2 November 10th 03 04:05 PM


All times are GMT +1. The time now is 02:52 PM.

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

About Us

"It's about Microsoft Excel"