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

Hi guys,

is there any way to override excell built-in commands by using vba ?

i could override Word commands by creating a procedure with the name of
original word command... but i can't do that in excell..
(i.e override edit-copy command or edit-undo command)

Thanx


  #2   Report Post  
Posted to microsoft.public.excel.programming
GB GB is offline
external usenet poster
 
Posts: 230
Default Override built-in commands

Yeah, I guess, you have to basically remove the edit copy and edit undo
commands from the applicable toolbars, and insert what you want, but there
are still the shortcut keys to worry about... As for overriding without
designing your own actions? Hmm... Anyone else?

What I described above is working with the CommandBars object.

"sos00" wrote:

Hi guys,

is there any way to override excell built-in commands by using vba ?

i could override Word commands by creating a procedure with the name of
original word command... but i can't do that in excell..
(i.e override edit-copy command or edit-undo command)

Thanx



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Override built-in commands

Thanks ...

but in Word we can override word commands completely.
for example when we create a sub as below

sub editcopy
MsgBox "Edit-Copy overrided"
end sub

all of commands which point to edit-copy will be override
(i.e pressing Ctrl+C , clicking Edit-Copy menu and etc)




"GB" wrote in message
...
Yeah, I guess, you have to basically remove the edit copy and edit undo
commands from the applicable toolbars, and insert what you want, but there
are still the shortcut keys to worry about... As for overriding without
designing your own actions? Hmm... Anyone else?

What I described above is working with the CommandBars object.

"sos00" wrote:

Hi guys,

is there any way to override excell built-in commands by using vba ?

i could override Word commands by creating a procedure with the name of
original word command... but i can't do that in excell..
(i.e override edit-copy command or edit-undo command)

Thanx





  #4   Report Post  
Posted to microsoft.public.excel.programming
GB GB is offline
external usenet poster
 
Posts: 230
Default Override built-in commands

Hmm.. I just tried what you described, and it actually worked for Word.
Surprise to me. As for Excel, well... I couldn't exactly say where it goes.
Because the question becomes, does it apply to the "ThisWorkbook", to a
"worksheet", or as just a generic module. In word, I put the command you
described in a Module on it's own and it worked fine. I also tried to review
the Object Browser, and found no instructions for that feature, same results
as in Excel. My only thought was that perhaps some sort of addin would
facilitate it. Or when going to paste the item within the current workbook,
that the change command picks up on it. Or... If you are trying to prevent
copying from Excel to anything, if you can check say the clipboard or some
variable to see if there is a copied region and the workbook loses focus,
then it either alerts the user, or dumps the clipboard...

At least it may be a way around the inability to directly override the
copy/cut option(s).. ???


"sos00" wrote:

Thanks ...

but in Word we can override word commands completely.
for example when we create a sub as below

sub editcopy
MsgBox "Edit-Copy overrided"
end sub

all of commands which point to edit-copy will be override
(i.e pressing Ctrl+C , clicking Edit-Copy menu and etc)




"GB" wrote in message
...
Yeah, I guess, you have to basically remove the edit copy and edit undo
commands from the applicable toolbars, and insert what you want, but there
are still the shortcut keys to worry about... As for overriding without
designing your own actions? Hmm... Anyone else?

What I described above is working with the CommandBars object.

"sos00" wrote:

Hi guys,

is there any way to override excell built-in commands by using vba ?

i could override Word commands by creating a procedure with the name of
original word command... but i can't do that in excell..
(i.e override edit-copy command or edit-undo command)

Thanx






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Override built-in commands

Thanks,

Or... If you are trying to prevent
copying from Excel to anything, if you can check say the clipboard or some
variable to see if there is a copied region and the workbook loses focus,
then it either alerts the user, or dumps the clipboard...

At least it may be a way around the inability to directly override the
copy/cut option(s).. ???


Yes, before i found this feature of Word, i tried this way but somethings
could not be captured anyway !
i.e Paste action or Undo/Redo actions !

when u open Macro dialog in Word, there is a "MacroIn" field that when u set
it to Word Commands u can see
all of this commands.
i didn't found anything like "Excel Commands" in excel's Macro dialog.


i think, like Word, this could be DDE commands of these applications.
so if capturing DDE commands be available , i think it could be it !
anyone have some info abt this ??




"GB" wrote in message
...
Hmm.. I just tried what you described, and it actually worked for Word.
Surprise to me. As for Excel, well... I couldn't exactly say where it
goes.
Because the question becomes, does it apply to the "ThisWorkbook", to a
"worksheet", or as just a generic module. In word, I put the command you
described in a Module on it's own and it worked fine. I also tried to
review
the Object Browser, and found no instructions for that feature, same
results
as in Excel. My only thought was that perhaps some sort of addin would
facilitate it. Or when going to paste the item within the current
workbook,
that the change command picks up on it. Or... If you are trying to
prevent
copying from Excel to anything, if you can check say the clipboard or some
variable to see if there is a copied region and the workbook loses focus,
then it either alerts the user, or dumps the clipboard...

At least it may be a way around the inability to directly override the
copy/cut option(s).. ???


"sos00" wrote:

Thanks ...

but in Word we can override word commands completely.
for example when we create a sub as below

sub editcopy
MsgBox "Edit-Copy overrided"
end sub

all of commands which point to edit-copy will be override
(i.e pressing Ctrl+C , clicking Edit-Copy menu and etc)




"GB" wrote in message
...
Yeah, I guess, you have to basically remove the edit copy and edit undo
commands from the applicable toolbars, and insert what you want, but
there
are still the shortcut keys to worry about... As for overriding
without
designing your own actions? Hmm... Anyone else?

What I described above is working with the CommandBars object.

"sos00" wrote:

Hi guys,

is there any way to override excell built-in commands by using vba ?

i could override Word commands by creating a procedure with the name
of
original word command... but i can't do that in excell..
(i.e override edit-copy command or edit-undo command)

Thanx










  #6   Report Post  
Posted to microsoft.public.excel.programming
GB GB is offline
external usenet poster
 
Posts: 230
Default Override built-in commands

Just throwing something out there, review the references that are used in
your Excel VBA code. May have DDE there, I'm going to look right now.


"sos00" wrote:

Thanks,

Or... If you are trying to prevent
copying from Excel to anything, if you can check say the clipboard or some
variable to see if there is a copied region and the workbook loses focus,
then it either alerts the user, or dumps the clipboard...

At least it may be a way around the inability to directly override the
copy/cut option(s).. ???


Yes, before i found this feature of Word, i tried this way but somethings
could not be captured anyway !
i.e Paste action or Undo/Redo actions !

when u open Macro dialog in Word, there is a "MacroIn" field that when u set
it to Word Commands u can see
all of this commands.
i didn't found anything like "Excel Commands" in excel's Macro dialog.


i think, like Word, this could be DDE commands of these applications.
so if capturing DDE commands be available , i think it could be it !
anyone have some info abt this ??




"GB" wrote in message
...
Hmm.. I just tried what you described, and it actually worked for Word.
Surprise to me. As for Excel, well... I couldn't exactly say where it
goes.
Because the question becomes, does it apply to the "ThisWorkbook", to a
"worksheet", or as just a generic module. In word, I put the command you
described in a Module on it's own and it worked fine. I also tried to
review
the Object Browser, and found no instructions for that feature, same
results
as in Excel. My only thought was that perhaps some sort of addin would
facilitate it. Or when going to paste the item within the current
workbook,
that the change command picks up on it. Or... If you are trying to
prevent
copying from Excel to anything, if you can check say the clipboard or some
variable to see if there is a copied region and the workbook loses focus,
then it either alerts the user, or dumps the clipboard...

At least it may be a way around the inability to directly override the
copy/cut option(s).. ???


"sos00" wrote:

Thanks ...

but in Word we can override word commands completely.
for example when we create a sub as below

sub editcopy
MsgBox "Edit-Copy overrided"
end sub

all of commands which point to edit-copy will be override
(i.e pressing Ctrl+C , clicking Edit-Copy menu and etc)




"GB" wrote in message
...
Yeah, I guess, you have to basically remove the edit copy and edit undo
commands from the applicable toolbars, and insert what you want, but
there
are still the shortcut keys to worry about... As for overriding
without
designing your own actions? Hmm... Anyone else?

What I described above is working with the CommandBars object.

"sos00" wrote:

Hi guys,

is there any way to override excell built-in commands by using vba ?

i could override Word commands by creating a procedure with the name
of
original word command... but i can't do that in excell..
(i.e override edit-copy command or edit-undo command)

Thanx









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
If/Vlookup override Carolina Excel Worksheet Functions 4 August 9th 09 07:00 PM
Override a Formula John K. Excel Discussion (Misc queries) 4 February 12th 07 07:47 PM
Cell Value Override saschamps9903 Excel Discussion (Misc queries) 0 January 21st 05 09:53 PM
How do I override a deletion box? DMuehl Excel Programming 2 September 30th 04 02:19 PM
Insert Character - Built-In Excel Commands Tonto[_2_] Excel Programming 4 July 7th 04 05:02 PM


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