Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

VB for excel - count time in mins ....

Thread Tools
 
Search this Thread
 
Old 11 March 2003, 06:24 AM
  #1  
velohead66
Scooby Regular
Thread Starter
 
velohead66's Avatar
 
Join Date: Oct 2002
Location: ex UK [SE], now Sunshine State [QLD,AUS]
Posts: 565
Likes: 0
Received 1 Like on 1 Post
Question

vb for excel question [again].
easy when you know how, i'm sure !!

I've got two macro 'buttons' and want to count the time elapsed in mins between button one being clicked and button two being clicked. Approx time will be around 10 mins.

Any ideas ??
Old 11 March 2003, 08:20 AM
  #2  
Fosters
Scooby Regular
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

'In the bas module for the sheet (not the workbook)
Dim dTimer As Date 'variable available to the worksheet
Sub Button1_Click()
dTimer = Now 'set it to current time
End Sub
Sub Button2_Click()
MsgBox Format(Now - dTimer, "HH:mm:ss")
'Cells(2, 2) = Format(Now - dTimer, "HH:mm:ss")
End Sub
Old 12 March 2003, 06:18 AM
  #3  
velohead66
Scooby Regular
Thread Starter
 
velohead66's Avatar
 
Join Date: Oct 2002
Location: ex UK [SE], now Sunshine State [QLD,AUS]
Posts: 565
Likes: 0
Received 1 Like on 1 Post
Cool

Ta, I'll try that at work, tomorrow.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Scott@ScoobySpares
Full Cars Breaking For Spares
61
11 January 2021 03:08 PM
Scott@ScoobySpares
Full Cars Breaking For Spares
55
05 August 2018 07:02 AM
Mattybr5@MB Developments
Full Cars Breaking For Spares
38
17 July 2016 10:43 PM
Scott@ScoobySpares
Full Cars Breaking For Spares
7
14 December 2015 08:16 AM
Mattybr5@MB Developments
Full Cars Breaking For Spares
20
22 October 2015 06:12 AM



Quick Reply: VB for excel - count time in mins ....



All times are GMT +1. The time now is 08:23 AM.