Custom Hotkey Strategy

S

Sprinks

We have 50 or so macros, some of which have assigned hotkeys. Others are
available only through a custom menu (thanks, John Walkenbach!). Our boss,
however, prefers different hotkeys than the rest of us, so I created a 2nd
file for him which has different hotkey assignments, as well as different
Descriptions for the custom menu, e.g.,

Round to One Place (Ctrl-r)

I'd rather not maintain two files, however, so I thought of extending the
table that John W.'s code uses, adding columns for "Default HotKeys" and [the
boss' username]. The code could then read the appropriate hotkey assignments
depending on the username.

This strategy breaks down, however, on a laptop or home computer that he
might use that doesn't have the same (if any) username, which would cause the
macros to work differently than he expects.

What I'd like to do is:
- Determine if we're on the corporate network
- if so, use the username
- if not, present the user a combo box to select the hotkey setup

Can anyone point me in the right direction?

Sprinks
 
T

Tom Ogilvy

try something like:

s = dir("\\server\folder\")
if s = "" then
' not on network
else
' on network
end if

You might need some error handling.
 
S

Sprinks

Thanks, Tom. That should do it.

Sprinks

Tom Ogilvy said:
try something like:

s = dir("\\server\folder\")
if s = "" then
' not on network
else
' on network
end if

You might need some error handling.
--
regards,
Tom Ogilvy

Sprinks said:
We have 50 or so macros, some of which have assigned hotkeys. Others are
available only through a custom menu (thanks, John Walkenbach!). Our boss,
however, prefers different hotkeys than the rest of us, so I created a 2nd
file for him which has different hotkey assignments, as well as different
Descriptions for the custom menu, e.g.,

Round to One Place (Ctrl-r)

I'd rather not maintain two files, however, so I thought of extending the
table that John W.'s code uses, adding columns for "Default HotKeys" and [the
boss' username]. The code could then read the appropriate hotkey assignments
depending on the username.

This strategy breaks down, however, on a laptop or home computer that he
might use that doesn't have the same (if any) username, which would cause the
macros to work differently than he expects.

What I'd like to do is:
- Determine if we're on the corporate network
- if so, use the username
- if not, present the user a combo box to select the hotkey setup

Can anyone point me in the right direction?

Sprinks
 

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