Run a macro when a cell is changed by an outside source

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

I am trying to run a macro when cell E5 is equal to 1. I have the
following code in my workbook:

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$E$5"
If Target.Value = 1 Then
Call Archive
End If
Case Else
End Select
End Sub

So this should run the "Archive" macro when E5 is 1. It does run the
macro perfectly when I manually input the value 1 into that cell. No
problems whatsoever. But, that cell is grabbing its value from some
external software called ProServer, the cell formula is
=PROSERVR|'GP1'!RESULT_1. The value is sent as a bit, so Excel sees it
as 0 or 1. If I watch the sheet while my ProServer program is running,
it clearly changes the value from 0 to 1 and then back to 0, as it
should. But my macro does not run when this occurs. My question is, how
is my entering the value manually any different than grabbing a value
from an outside soure. Auto-calculate is on, I'm running Excel 2003 on
WinXP if that helps. Let me know if more details are needed. Thanks for
any help you can give.

-Jon
 
Does anything else in the worksheet respond to E5 changing? For example, if
E6 contains =E5+1, will it change to reflect the change in E5?
 
Yes, I have a formula in another cell that says =IF(E5=1,"printing","")
and it works just as you would expect. I tried to run my macro from
this, where the macro ran when the cell said "printing". Still no luck!
 

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