Change Event Problem

  • Thread starter Thread starter John
  • Start date Start date
J

John

I'm using a Worksheet_Change event procedure to call a sub
that performs validation, calculations, and formatting on
the sheet whenever the user updates a cell in a specified
range. This works great when the entry is confirmed in any
way except by clicking a tab to activate another sheet.
Then, of course, all the actions affect the newly
activated sheet instead of the intended one. How can I
prevent this from happening?
 
Hi John
would be helpful if you post your code. I'd guess adding the worksheet
reference to your cell manipulation would help. So something like
changing
Range("A1").value = 1
to
Me.Range("A1").value = 1
 
Change all your implicit worksheet object references to explicit Me. That
will then refer to the sheet that initiated the action.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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