-
Hi all,
Is there a way of inputting a clock via VB code into my Excel Spreadhseet. I would like it to be constantly updated.
Thanks :):)
-
VBA in Excel
Easiest way is to use the Timer statement in Excel to get a time and then update some Cell to indicate the time. You could use VB with a timer control to call that user defined function at regular intervals using Excel as an OLE object.
e.g. Dim xlApp as Excel Application etc...
This sub-routine will return the time in Excel VBA
Code:
Public Sub DisplayClock()
Dim t As Single, u As Date
t = Timer
u = CDate(t / 86400)
MsgBox u
End Sub
Cheers,
Paul.
P.S. Does anyone know how to poll automatically in Excel alone?