how to track a change in a cell content

S

S

Dear All,

I have a problem with an excel application. I am using an excel add-in
written by someone else, I do not have access to the code (it is in a
dll). The add-in connects to some machines that we have here in the
labs. The machines are in a network.
In the cells of an excel workbook, I can monitor the temperature of
the machines in the labs during the experiments and get warning
signals if anything goes wrong.
My problem is that I would like to track the temperature of the
machines in a database. Actually, I would like to record temperature
changes in the database. An example of what I mean will make things
clear.

Let's say that I have the following time series (time in seconds and
temperature in Celsius):

time temperature
00001 200
00002 200
00003 202
00004 200
00005 200
00006 203
00007 203
00008 200
00009 200
00010 200

What I want to store in the database is the following:

time temperature
00001 200
00003 202
00004 200
00006 203
00008 200

which is what gets displayed in the Excel cell.

I know how to copy a value from a cell to another (or to an Access
database), what I do not know is to code in VBA the following: "when
the content of this cell changes, then copy it to the other location".

I tried the following:

Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
MsgBox ("A1 has changed")
End If
End Sub

but in my case is not appropriate because it works if the cell content
is changed by the user only.

Has any of you got an idea of how to do it?

I thank you in advance for your time.

S
 
B

Bernie Deitrick

S,

Put a formula in another cell that links to the cell being changed. When
that cell updates, it should force a calculate event, which you can then
use.

HTH,
Bernie
MS Excel MVP
 

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

Top