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
 
Thank you very much Tom, your assume is correct. It work as I would like to.
Long
 

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