Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default time tracker - please help


hi,please help me with this:
im doing a real time tracker, if i click on the cell A1, cell C1 will
display the status START and cell D1 will display the current time only
and when i am done, i will click on cell B1 and cell C1 will display the
status STOPPED and cell E1 will display the current time only and cell
F1 will display the total time consumed from D1 and E1, and when i
decide to continure my work i want F1 to be updated with the current
time consumed.....how will do this?....please help me...i really need
this to run....thanks so much:(


--
tweety127
------------------------------------------------------------------------
tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673
View this thread: http://www.excelforum.com/showthread...hreadid=568006

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default time tracker - please help

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "A1:B1"

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Column = 1 Then
Me.Cells(.Row, "C").Value = "START"
Me.Cells(.Row, "D").Value = Time
Me.Cells(.Row, "D").numberform = "hh:mm:ss"
Else
Me.Cells(.Row, "C").Value = "STOPPED"
Me.Cells(.Row, "E").Value = Time
Me.Cells(.Row, "E").numberform = "hh:mm:ss"
Me.Cells(.Row, "F").Value = Me.Cells(.Row, "F").Value + _
Me.Cells(.Row, "E").Value - Me.Cells(.Row, "D").Value
Me.Cells(.Row, "F").numberform = "hh:mm:ss"
End If
End With
End If
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"tweety127" wrote
in message ...

hi,please help me with this:
im doing a real time tracker, if i click on the cell A1, cell C1 will
display the status START and cell D1 will display the current time only
and when i am done, i will click on cell B1 and cell C1 will display the
status STOPPED and cell E1 will display the current time only and cell
F1 will display the total time consumed from D1 and E1, and when i
decide to continure my work i want F1 to be updated with the current
time consumed.....how will do this?....please help me...i really need
this to run....thanks so much:(


--
tweety127
------------------------------------------------------------------------
tweety127's Profile:

http://www.excelforum.com/member.php...o&userid=34673
View this thread: http://www.excelforum.com/showthread...hreadid=568006



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default time tracker - please help


i run the code and it worked but i encountered this error "run-time
error 438" - Object doesn't support this property or method......thanks
so much....


--
tweety127
------------------------------------------------------------------------
tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673
View this thread: http://www.excelforum.com/showthread...hreadid=568006

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default time tracker - please help


hi bob,
just a question...
why is it when i save the file containing the code you sent me and
tried to open it again, the code doesn't work anymore....


--
tweety127
------------------------------------------------------------------------
tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673
View this thread: http://www.excelforum.com/showthread...hreadid=568006

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default time tracker - please help

Sounds like events may be turned off.

Try adding this to the end of the code

Application.EnableEvents = True

and also type that statement in the immediate window.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"tweety127" wrote
in message ...

hi bob,
just a question...
why is it when i save the file containing the code you sent me and
tried to open it again, the code doesn't work anymore....


--
tweety127
------------------------------------------------------------------------
tweety127's Profile:

http://www.excelforum.com/member.php...o&userid=34673
View this thread: http://www.excelforum.com/showthread...hreadid=568006



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
Help for Time tracker updation Igneshwara reddy[_2_] Excel Worksheet Functions 1 May 25th 09 05:28 PM
Tracker CX Manager NY Excel Worksheet Functions 2 September 12th 08 12:27 AM
Time-Tracker form, multiple instance of Excel Duncan[_5_] Excel Programming 5 May 19th 06 03:34 PM
Time Tracker Duncan[_5_] Excel Programming 4 May 17th 06 04:09 PM
Time Tracker Duncan[_5_] Excel Programming 1 May 17th 06 02:19 PM


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