Writing a variables value every second to a table

M

MJKelly

Hi,

I have a number of routines which change the value of a variable each
time they are activated (by the user). I need to write the value of
this variable every second to a table within the spreadsheet. Is this
possible? I can grab the value and write it to the table but I am not
sure how to:-

1 - Write the code which triggers this each second.
2- Whether or not this would continue to happen as the user activates
other sub routines.

I am then using the data in the table to construct a graph plotting
the changing value of the variable.

Hope you can help?

Kind regards,
Matt
 
J

Jarek Kujawa

tried sth. like that?

'the value of your variable is set here
Application.Wait Now() + Timevalue("00:00:01")
'your code to input the variable into a table
 
M

MJKelly

Thanks, I'll give that a try, but I need to capture the value of the
variable every second not just when its changed. That way I can plot
the duration the variable stays at any value, onto the graph. I need
to start a timer when the user starts the process and then capture the
variables value each second until the user stops.

Not sure how to stop the capturing of the variable either as I would
know how many seconds he process will run?


Thanks,
Matt.
 

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