Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 29th, 2007, 01:24 AM
Registered User
Join Date: Mar 2007
Location: hyderabad, andhra pradesh, Afghanistan.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to display the time(running time) in Excel

Hi All,

       I need the VBA code to display the time in Excel.I used the "Time" function but it is not showing the running time.It is showing the fixed time i.e., The Time when we compiled the code but i want the dynamic time i.e., The Time must be updating for every second (Running or Dynamic Time).
               Plz anybody help me in this regard.
                                                   Thank you:)
Reply With Quote
  #2 (permalink)  
Old March 29th, 2007, 01:56 AM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts

Add a Timer Control to your form and set the timer interval.

In the Timer event for that timer set (refresh) the time

Private Sub Timer1_Timer()

    Label1.Caption = Date & " " & Time

End Sub

Private Sub UserForm_Initialize()
 Timer1.Interval = 1000
End Sub


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Shift time in minus time out lechalas Beginning VB 6 1 August 11th, 2008 01:56 PM
display server time arabuafef Classic ASP Basics 1 March 18th, 2007 06:16 PM
Running queries at a time Amitava Deewan Oracle 1 March 19th, 2005 12:18 PM
Display time on the report rajanikrishna Crystal Reports 0 March 11th, 2005 06:17 AM
Display Continuous Time mjwelker VB.NET 2002/2003 Basics 1 May 4th, 2004 08:31 AM

All times are GMT -4. The time now is 05:05 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.