Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How to set time for processing the code?

Does anyone have any suggestions on how to set time for processing the code?
I would like to add a condition that allow process the code before 4 pm,
Does anyone have any suggestions on how to do it?
Thanks in advance for any suggestions
Eric

If FileDateTime(PathFileName) Date + TimeSerial(8, 0, 0) Or Now <
TimeSerial(16, 0, 0) Then {It does not work!}

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default How to set time for processing the code?

hi
i think the ontime method might do better.
see this site for more details
http://www.cpearson.com/excel/OnTime.aspx

regards
FSt1

"Eric" wrote:

Does anyone have any suggestions on how to set time for processing the code?
I would like to add a condition that allow process the code before 4 pm,
Does anyone have any suggestions on how to do it?
Thanks in advance for any suggestions
Eric

If FileDateTime(PathFileName) Date + TimeSerial(8, 0, 0) Or Now <
TimeSerial(16, 0, 0) Then {It does not work!}

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default How to set time for processing the code?

hi
Sub sheetnamesonSheet()

Dim r As Range
Dim rd As Range
Dim WS As Worksheet
Set r = Range("A2") 'change if needed. used sheet1 for demo
For Each WS In Worksheets
Set rd = r.Offset(1, 0)
r.Value = WS.Name
Set r = rd
Next WS
End Sub

goes in a standard module.

regards
FSt1

"Eric" wrote:

Does anyone have any suggestions on how to set time for processing the code?
I would like to add a condition that allow process the code before 4 pm,
Does anyone have any suggestions on how to do it?
Thanks in advance for any suggestions
Eric

If FileDateTime(PathFileName) Date + TimeSerial(8, 0, 0) Or Now <
TimeSerial(16, 0, 0) Then {It does not work!}

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How to set time for processing the code?

If FileDateTime(PathFileName) Date + TimeSerial(8, 0, 0) Then {It is
working!}

I would like to add another condition that allow process the code before 4
pm, which I tried and show below, but it does not work.

If FileDateTime(PathFileName) Date + TimeSerial(8, 0, 0) Or Now <
TimeSerial(16, 0, 0) Then {It does not work!}

Do you have any suggestions?
Thanks in advance for any suggestions
Eric


"FSt1" wrote:

hi
Sub sheetnamesonSheet()

Dim r As Range
Dim rd As Range
Dim WS As Worksheet
Set r = Range("A2") 'change if needed. used sheet1 for demo
For Each WS In Worksheets
Set rd = r.Offset(1, 0)
r.Value = WS.Name
Set r = rd
Next WS
End Sub

goes in a standard module.

regards
FSt1

"Eric" wrote:

Does anyone have any suggestions on how to set time for processing the code?
I would like to add a condition that allow process the code before 4 pm,
Does anyone have any suggestions on how to do it?
Thanks in advance for any suggestions
Eric

If FileDateTime(PathFileName) Date + TimeSerial(8, 0, 0) Or Now <
TimeSerial(16, 0, 0) Then {It does not work!}

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default How to set time for processing the code?

ignore this post. i posted to the wrong thread.
sorry

Regards
FSt1

"FSt1" wrote:

hi
Sub sheetnamesonSheet()

Dim r As Range
Dim rd As Range
Dim WS As Worksheet
Set r = Range("A2") 'change if needed. used sheet1 for demo
For Each WS In Worksheets
Set rd = r.Offset(1, 0)
r.Value = WS.Name
Set r = rd
Next WS
End Sub

goes in a standard module.

regards
FSt1

"Eric" wrote:

Does anyone have any suggestions on how to set time for processing the code?
I would like to add a condition that allow process the code before 4 pm,
Does anyone have any suggestions on how to do it?
Thanks in advance for any suggestions
Eric

If FileDateTime(PathFileName) Date + TimeSerial(8, 0, 0) Or Now <
TimeSerial(16, 0, 0) Then {It does not work!}

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
Processing Time Varies Paige Excel Programming 3 June 18th 08 10:11 PM
Extreme, time-consuming processing GARY Excel Discussion (Misc queries) 0 February 25th 08 03:24 PM
How to measure time for processing periods? Eric Excel Discussion (Misc queries) 6 August 15th 07 12:48 PM
Processing Time [email protected] Excel Worksheet Functions 0 July 20th 07 06:52 PM
Processing time to set values Eric Excel Programming 1 November 2nd 04 07:53 PM


All times are GMT +1. The time now is 03:34 AM.

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"