preventing use of F9 (recalculate)

  • Thread starter Thread starter scottwilsonx
  • Start date Start date
S

scottwilsonx

Hello. Is there a way to automatically stop someone from being able t
press F9 to recalculate the formulae in a spreadsheet ?

The reason I need to prevent this keystroke is that I am running
separate sort macro and when the F9 is pressed after the sort i
automatically reorders the number based on a number of INDEX formulas.

Many thanks for your help with this one.

Scott
 
You could try:

Sub CancelF9()
Application.OnKey "{f9}", ""
End Sub
you will have to run the procedure for it to work - when
F9 pressed it should do nothing - but not tested.

Hope helpful.
 
whoops:
forgot to add empty proceedure call - otherwise key
reverts to normal use.

Sub CancelF9()
Application.OnKey "{f9}", "donothing"
End Sub

Sub donothing()
End Sub

hope helps
 
Don't forget to stop me from using:
Tools|options|calculation tab|and clicking that button.

And shift-F9, Ctrl-Alt-F9, and ctrl-shift-alt-f9, too.

And even just selecting a cell, hitting F2 and then enter to calculate that one
cell.
 

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