Hiding Macro List - Using Shortcut Key

J

John Michl

I'm trying to hide the macro list from users but I still want to be able to
use a shortcut key on a few macros. For instance, I have a macro with an
assigned short-cut that "Prepares the Workbook for Development" by unhiding
and unprotecting all sheets. Hitting the short cut key fires the Sub to
"Prepare for Development". Hitting the shortcut a second time "Prepare For
End-users" by hiding certain sheets and protecting certain sheets.

I don't want to assign this to a button (unless there is no other way.)

When I use a dummy argument on the Sub name as in
Sub SubName (Optional FakeArg As [type])
hitting the short-cut key pops up the macro list expecting me to pick the
appropriate macro.

Any ideas?

Thanks - John Michl
www.johnmichl.com
 
J

John Michl

Thanks, Tom.

Is it true that if I use the Private statement, this sub cannot be called by
other subs?

- John

Tom Ogilvy said:
Private Sub Whatever()

End Sub

--
Regards,
Tom Ogilvy

John Michl said:
I'm trying to hide the macro list from users but I still want to be able to
use a shortcut key on a few macros. For instance, I have a macro with an
assigned short-cut that "Prepares the Workbook for Development" by unhiding
and unprotecting all sheets. Hitting the short cut key fires the Sub to
"Prepare for Development". Hitting the shortcut a second time "Prepare For
End-users" by hiding certain sheets and protecting certain sheets.

I don't want to assign this to a button (unless there is no other way.)

When I use a dummy argument on the Sub name as in
Sub SubName (Optional FakeArg As [type])
hitting the short-cut key pops up the macro list expecting me to pick the
appropriate macro.

Any ideas?

Thanks - John Michl
www.johnmichl.com
 
T

Tom Ogilvy

Other subs in other modules, problem. Other subs in the same module, no
problem.

--
Regards,
Tom Ogilvy

John Michl said:
Thanks, Tom.

Is it true that if I use the Private statement, this sub cannot be called by
other subs?

- John

Tom Ogilvy said:
Private Sub Whatever()

End Sub

--
Regards,
Tom Ogilvy

John Michl said:
I'm trying to hide the macro list from users but I still want to be
able
to
use a shortcut key on a few macros. For instance, I have a macro with an
assigned short-cut that "Prepares the Workbook for Development" by unhiding
and unprotecting all sheets. Hitting the short cut key fires the Sub to
"Prepare for Development". Hitting the shortcut a second time
"Prepare
For
End-users" by hiding certain sheets and protecting certain sheets.

I don't want to assign this to a button (unless there is no other way.)

When I use a dummy argument on the Sub name as in
Sub SubName (Optional FakeArg As [type])
hitting the short-cut key pops up the macro list expecting me to pick the
appropriate macro.

Any ideas?

Thanks - John Michl
www.johnmichl.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top