Limit entry in range

  • Thread starter Thread starter smi
  • Start date Start date
S

smi

Hello group,

Please help, I am using Excel 97 with Win 95. I have a button with VBA code,
I need an other code to limit the user to use this button in some range only
(B10:B50). The button with not work outside this limit.
Thank you very much for your time.

Long
 
at the beginning of your code for the button, check

Let us assume the button is designed to act on the activeCell

At the top of the sub fired when the button is clicked:
if intersect(activeCell,Range("B10:B50")) is nothing then exit sub
 
Back
Top