Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Update the time in a form caption
I am working on a project using forms in excel. I need to have th
time updated in the caption on the form. So, as each second passes I need to be able to see that. Please help Thank Andre |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Update the time in a form caption
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Update the time in a form caption
Try this,
Put below code into form's code module. Dim TimeUpdate As Boolean Private Sub UserForm_Activate() TimeUpdate = True Do DoEvents If TimeUpdate Then Me.Caption = Time Else Exit Sub End If Loop End Sub Private Sub UserForm_Terminate() TimeUpdate = False End Sub Regards, Shah Shailesh http://members.lycos.co.uk/shahweb/ (Excel Add-ins) *** Sent via Developersdex http://www.developersdex.com *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Update the time in a form caption
you'll need to use a timer control that fires every second. There are quite a
few ActiveX controls that do this .. do a google search.. Updateing the caption is simplistic Private Sub UserForm_Click() UpdateDaption End Sub Sub UpdateDaption() Me.Caption = "Time: " & Format$(Now, "HH:MM:SS") End Sub http://uk.builder.com/downloads/0,39...tm?query=timer HTH to test the sub, I used the userform's click evnt to call the caption update routine "jarosinski2" wrote: I am working on a project using forms in excel. I need to have the time updated in the caption on the form. So, as each second passess I need to be able to see that. Please help! Thanks Andrew |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Form Caption Logo, How? | Excel Discussion (Misc queries) | |||
Form Caption Logo, How? | Excel Programming | |||
Form Caption Logo, How? | Excel Worksheet Functions | |||
Can I have a user form with no Header/Caption Bar ? | Excel Programming | |||
Userform - Label Caption - How to update from a variable | Excel Programming |