Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default how to show time on the caption of excel window?

The OnTime method will eventually fail for this - all it takes is one missed
call when you are editing a cell. Here's an alternative that relies on an
activex wrapper I put around the VB timer that you can get from my site
he
http://www.enhanceddatasystems.com/E...ExcelTimer.htm

The benefit of this is that the timer event does not fire while you are
editing a cell or Excel is busy, but does fire after you have stopped
whatever you are doing. It's also a lot simpler than using Windows API
callbacks.

1. Register the activex control (instructions on the web page)
2. Create a new project, add a form called frmTimer and a module.
3. Add the VBA Timer control to the form.
4. In the module add this

Sub StartClock()
With frmTimer.Timer1
.Interval = 1000
.Enabled = True
End With
'n.b. you do not need to show the form
End Sub

Sub StopClock()
Unload frmTimer
End Sub

5. In the form code, add this

Private Sub Timer1_Timer()
On Error Resume Next
Application.Caption = Format(Now, "HH:MM:SS")
On Error GoTo 0
End Sub

Robin Hammond
www.enhanceddatasystems.com

"show time on the caption of excel window" <show time on the caption of
excel wrote in message
...
how to show time on the caption of excel window? who can help me?



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
show minimize window selection for Excel Spence Excel Discussion (Misc queries) 0 May 18th 10 04:44 PM
How do I open excel so it maximizes the window every time? Soaring Eagle Excel Discussion (Misc queries) 0 July 26th 07 02:10 PM
How do I open excel so it maximizes the window every time? Mike H Excel Discussion (Misc queries) 0 July 26th 07 01:46 PM
Properties window show nothing for a userform Cheer-Phil-ly Excel Discussion (Misc queries) 0 July 27th 06 07:15 PM
Cannot Get Caption to show on custom toolbar button Rob Bovey Excel Programming 1 August 1st 03 02:38 AM


All times are GMT +1. The time now is 10:36 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"