Recovering from temporary loss of network drive - Excel VBA problem

  • Thread starter Thread starter PaulC
  • Start date Start date
P

PaulC

Hi Dave

I have, at last, got a procedure to work thatwill save the main file'
data to a temp file on the local drive if the network has bee
interupted. A separate macro is then be used to replace the data whe
the network is available again.

I have also included a Save Workbook macro button that also tests fo
an error on saving to the network. To stop users saving normally,
have removed the Save icon and the Save entry in the File menu
However, I don't know the VBA code to stop them using CtrlS. I would b
very grateful if you can enlighten me on this one.

Many thanks,

Pau
 
Sorry here is the code
Application.OnKey "{ESC}", ""
Application.OnKey "^{BREAK}", ""
Application.OnKey "^{PGDN}", "" 'Disable Ctrl-PageUp
Application.OnKey "^{PGUP}", "" 'Disable Ctrl-PageDown

Application.OnKey "^{s}", ""
Application.OnKey "^{c}", ""
Application.OnKey "^{g}", ""
Application.OnKey "^{n}", ""
Application.OnKey "^{f}", ""
Application.OnKey "^{x}", ""
 
Just to add to Jim's comments:

Application.OnKey "^s", "" 'save shortcut
Application.OnKey "^S", "" 'saveas shortcut

And to reset them:

Application.OnKey "^s"
Application.OnKey "^S"
 

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

Back
Top