ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Writing a variables value every second to a table (https://www.excelbanter.com/excel-programming/427025-writing-variables-value-every-second-table.html)

MJKelly

Writing a variables value every second to a table
 
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

Jarek Kujawa[_3_]

Writing a variables value every second to a table
 
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



Uzytkownik "MJKelly" napisal w wiadomosci
...
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




MJKelly

Writing a variables value every second to a table
 
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.


All times are GMT +1. The time now is 11:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com