Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If/Vlookup override | Excel Worksheet Functions | |||
Override a Formula | Excel Discussion (Misc queries) | |||
Cell Value Override | Excel Discussion (Misc queries) | |||
How do I override a deletion box? | Excel Programming | |||
Insert Character - Built-In Excel Commands | Excel Programming |