Selasa, 16 Juli 2013

Re: [ExcelVBA] A simple uptime logging worksheet?

 

Dr. B:
 
Does it HAVE to be an Excel file?
I did something similar many (many) years ago.
I created a VBScript file that captured the time when the script started,
then wrote that time and the current time to a text file every 10 seconds.
 
the output file was on a network drive, so I could look at it from a remote workstation.
 
The VBScript was placed in the startup folder, so it started whenever Windows was executed. I even got even more elaborate and had it only run if the output file existed.  That way, in order to disable the macro, all I had to do is delete the output file.
To start it up again, I created the file and the next time the machine was logged in, it ran.
 
This way, it's behind-the-scenes, didn't take much cpu time, and didn't need Excel running.
 
If you want, I can try to locate (or re-create) the VBScript.

Paul
-----------------------------------------
"Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can." - John Wesley
-----------------------------------------

>________________________________
>From: Dr John C Bullas <john.bullas@gmail.com>
>To: excelvba@yahoogroups.com
>Sent: Monday, July 15, 2013 5:46 PM
>Subject: [ExcelVBA] A simple uptime logging worksheet?
>

>Good afternoon,
>
>I am a newby as regards VB, I know what I want to achieve but I have no
>real idea how to go about it. I want to leave a worksheet open that will
>autosave to keep a record of the current time and when it was opened, thus
>the uptime is recorded.....
>
>=================
>
>Sub WaitFor(NumOfSeconds As Long)
>Dim SngSec as Long
>SngSec=Timer + NumOfSeconds
>
>Do while timer < sngsec
>DoEvents
>Loop
>
>End sub
>
>=============
>
>Called up by
>
>Call WaitFor()
>
>i.e Call Waitfor(60) for a delay of a minute
>
>====
>
>I want to have a worksheet with a GO button that copies the value of NOW()
>into A1 and then waits for a minute copies the value of NOW() into A2 then
>saves the worksheet then waits for a minute then repeats the write of NOW()
>to A2 and saves again
>
>When this falls over I will have the uptime and the start and end times for
>the period
>
>Is this difficult to code?
>
>--
>
>===========================
>http://uk.linkedin.com/in/drjohnbullas
>
>[Non-text portions of this message have been removed]
>
>
>

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar