R
R Tanner
Hi,
I need to run a procedure when the value of a specific cell changes..
How would I do that?
I need to run a procedure when the value of a specific cell changes..
How would I do that?
You are talking about Event code. Right click the sheet tab you want to catch
the events on and select View Code. The VBE will open. Just above the code
window to the left is a drop down of the Object. Change it from General to
Worksheet. A code stub will be created for you base on selection change. In
the drop down next to the one you just changed is a list of the events.
Select Change and you will get a code stub something like this...
Private Sub Worksheet_Change(ByVal Target As Range)
End Sub
Target is the cell that was changed so just do something like this...
Private Sub Worksheet_Change(ByVal Target As Range)
if target.Address = "$A$1" then msgbox "Tada"
End Sub
--
HTH...
Jim Thomlinson
- Show quoted text -
If it was me I would write the data to a database such as Access. Then you
can use XL as your front end or you can use Access to get at the data. The
nice thing about using a database is that it will allow concurrent accessto
the data. Take a look for ADODB.Recordset to get some examples of reading
from and writing to a database...
--
HTH...
Jim Thomlinson
- Show quoted text -
That will make life a little trickier. In Access you can just import someof
the data into a new table. That will give a table to read an write to. That
being said if you know nothing of databases do you really want to head down
that road...
--
HTH...
Jim Thomlinson
- Show quoted text -
That will make life a little trickier. In Access you can just import some
of
the data into a new table. That will give a table to read an write to.
That
being said if you know nothing of databases do you really want to head
down
that road...
--
HTH...
Jim Thomlinson
- Show quoted text -