Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
private macro and shortcut key
Is it possible to have a keyboard shortcut for a macro that is designated
Private? I have created a macro and given it a keyboard shortcut. The macro works perfectly, until I made it "Private Sub Macro." Any ideas why this doesn't work? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
private macro and shortcut key
Since it is private to your project/workbook/module, then the application
can not see the procedure. -- Regards, Tom Ogilvy "redb" wrote in message ... Is it possible to have a keyboard shortcut for a macro that is designated Private? I have created a macro and given it a keyboard shortcut. The macro works perfectly, until I made it "Private Sub Macro." Any ideas why this doesn't work? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
private macro and shortcut key
If you want, you can call it from a Public Sub, and have the Public Sub assigned to a keyboard shortcut: Sub myPublicRoutine Call myPrivateRoutine End Sub Private Sub myPrivateRoutine msgbox "Called from public routine which was initiated from a keyboard shortcut" end sub Here's some verbage on Public/Private Public Optional. Indicates that the Sub procedure is accessible to all other procedures in all modules. If used in a module that contains an Option Private statement, the procedure is not available outside the project. Private Optional. Indicates that the Sub procedure is accessible only to other procedures in the module where it is declared. "Tom Ogilvy" wrote: Since it is private to your project/workbook/module, then the application can not see the procedure. -- Regards, Tom Ogilvy "redb" wrote in message ... Is it possible to have a keyboard shortcut for a macro that is designated Private? I have created a macro and given it a keyboard shortcut. The macro works perfectly, until I made it "Private Sub Macro." Any ideas why this doesn't work? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
re : Possible to run private sub macros by writing another private | Excel Programming | |||
Private Sub Running Other Private Sub Inadvertently | Excel Programming | |||
Possible to assign macro defined as private to a form control. | Excel Programming | |||
Macro Shortcut | Excel Programming | |||
Add code to Private Sub ComboBox1_Change() with a macro from a different workbook | Excel Programming |