run sub when one cell is changed

  • Thread starter Thread starter NDBC
  • Start date Start date
N

NDBC

I know i can run private subs based on something like this

Private Sub Worksheet_Change(ByVal Target As Range)

if target.address = "c20" then
.........

But in the name of efficiency is there a way to name a sub so that it is not
even activated unless a specific cell is changed.

Thanks
 
sorry for the double post but i am having trouble posting. I keep getting the
service is temporarily unavailable messages.
 
The short answer is no. Something has to send a signal that the macro needs
to run. That something is an event that Excel can detect. Then something
has to tell Excel what to do after that event is detected. That is the VBA
code in this case. The name of the macro for Worksheet_Change is a
predefined constant that tells Excel to react to changes in the worksheet
that the code underlies. So it all ties together. The problem lies in
detecting the change, without using the change event.
 

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