Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Override a built-in command with a macro

Hi,
I'd like to see a macro running when invoking a built-in command. I.e. when
choosing "File - New" my own macro should run.

I already asked this question on another news group and got the answer, that in
Word, I only have to give my macro the same name as the desired Word command.

This works great - in Word. But is there a similar way in Excel? If yes, how can
I get a list of these commands?


Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Override a built-in command with a macro

Word and XL are 2 very different things. In Word you are dealing with
modifications to the Normal.dot which is the starting point of all documents.
XL does not have the same structure. To do what you want will require
creating an addin. Within the addin you need to create an object to listen
for events that the XL application is firing.

Here are a couple of links to get you started...
http://www.cpearson.com/excel/AppEvent.aspx
http://www.cpearson.com/excel/CreateAddIn.aspx
--
HTH...

Jim Thomlinson


"Robert Schwenn" wrote:

Hi,
I'd like to see a macro running when invoking a built-in command. I.e. when
choosing "File - New" my own macro should run.

I already asked this question on another news group and got the answer, that in
Word, I only have to give my macro the same name as the desired Word command.

This works great - in Word. But is there a similar way in Excel? If yes, how can
I get a list of these commands?


Robert

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
Last Cell Reset Command- Built In Matthew Excel Discussion (Misc queries) 0 May 20th 09 01:34 AM
Command Bars - working with the built in buttons Jim Rech Excel Programming 0 September 17th 07 07:54 PM
disable built-in menu and short-cut key for cut command travis Excel Discussion (Misc queries) 1 July 21st 06 05:18 PM
Override built-in commands sos00 Excel Programming 5 January 17th 06 12:11 PM
Access a built-In command? MacroWeasel Excel Programming 0 August 1st 03 04:21 PM


All times are GMT +1. The time now is 11:39 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"