Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Need Help with Code - TimeValue

I need help with the following code. The code as is works great, but I'm
looking for a way to control the TimeValue("00:02:00") based on a value
entered in cell B5 in worksheet1.

Is this doable?

Thanks in advance for the help.

Dim dNext As Date

Sub StartDoingIt()
'calculate when code should run again
dNext = Now + TimeValue("00:02:00")
'set on time event to trigger running
Application.OnTime dNext, "StartDoingIt"
' whatever you want to do
PasteToArchive
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Need Help with Code - TimeValue

Depending on what was in the cell:

dNext = Now + worksheets("sheet1").range("B5").value

(B5 held a time???)



Donnie Stone wrote:

I need help with the following code. The code as is works great, but I'm
looking for a way to control the TimeValue("00:02:00") based on a value
entered in cell B5 in worksheet1.

Is this doable?

Thanks in advance for the help.

Dim dNext As Date

Sub StartDoingIt()
'calculate when code should run again
dNext = Now + TimeValue("00:02:00")
'set on time event to trigger running
Application.OnTime dNext, "StartDoingIt"
' whatever you want to do
PasteToArchive
End Sub


--

Dave Peterson

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
how do I convert a value into timevalue on excel? Blondie Excel Worksheet Functions 1 January 26th 07 01:21 PM
timevalue function busterpace Excel Worksheet Functions 2 October 8th 06 03:39 AM
How do I enter a cell value into the Timevalue() function? busterpace Excel Worksheet Functions 1 October 8th 06 02:23 AM
TimeValue formula Phrank Excel Worksheet Functions 2 September 20th 06 10:27 AM
Calculation to subtract TimeValue from Now() Value Trying to excel in life but need help Excel Worksheet Functions 1 April 7th 05 09:51 PM


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