Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Update the time in a form caption

Does this help?
http://www.xtremevbtalk.com/archive/.../t-214279.html
OJ

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Caption Logo, How? WTG Excel Discussion (Misc queries) 1 March 1st 05 12:49 PM
Form Caption Logo, How? WTG Excel Programming 1 February 27th 05 11:21 PM
Form Caption Logo, How? WTG Excel Worksheet Functions 0 February 27th 05 01:40 PM
Can I have a user form with no Header/Caption Bar ? RandyDtg1 Excel Programming 4 September 5th 04 10:09 PM
Userform - Label Caption - How to update from a variable Alan Excel Programming 3 August 2nd 04 04:39 AM


All times are GMT +1. The time now is 01:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"