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 within macro?

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) 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!}

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default How to set time within macro?

Instead of Now try

Time < timeserial(16,0,0)

--
Jacob


"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) 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!}

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
Macro / function text time to 24hr excel time passed midnight fortotaling hr's Russmaz Excel Worksheet Functions 2 March 6th 09 04:58 AM
Macro elapsed time bar (same as download time elapsed bar) klysell Excel Programming 2 April 26th 07 04:58 PM
time and auto macro run by setting time ddiicc Excel Programming 1 September 29th 05 05:32 AM
Help with Macro to Convert Date/Time to Time Only Bill[_26_] Excel Programming 5 August 25th 04 01:50 PM
excel - macro - automatic initiation of a macro at a pre-specified "system time" arunjoshi[_3_] Excel Programming 3 May 1st 04 09:42 AM


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