Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default prob with TODAY() within a macro

y this today() function is giving me an error when it is run within teh macro?
what should i include



Sub FTPmacro()

Cells(1, 10).value = TODAY() - Weekday(TODAY() + 1, 1) + 7

end sub

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default prob with TODAY() within a macro

Use Date in VBA

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"deepika :excel help" schreef in bericht
...
y this today() function is giving me an error when it is run within teh macro?
what should i include



Sub FTPmacro()

Cells(1, 10).value = TODAY() - Weekday(TODAY() + 1, 1) + 7

end sub


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default prob with TODAY() within a macro

In VBA, use "Date" rather than "Today()"

Regards
Fred

"deepika :excel help" wrote in
message ...
y this today() function is giving me an error when it is run within teh
macro?
what should i include



Sub FTPmacro()

Cells(1, 10).value = TODAY() - Weekday(TODAY() + 1, 1) + 7

end sub


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
vlookup prob with all #n/a's Janis Excel Discussion (Misc queries) 5 July 30th 07 10:26 PM
Macro Prob Carl Excel Worksheet Functions 3 August 28th 06 05:03 PM
Open an Excel file with a date as today in a macro Perry Excel Discussion (Misc queries) 4 November 10th 05 09:57 AM
How to record macro to print pages modified today pamiam3333 Excel Worksheet Functions 1 September 10th 05 02:36 AM
=IF(OR(TODAY()G9),"Pass","Overdue") Why doe it not wo. Fkor Excel Discussion (Misc queries) 3 March 10th 05 08:29 AM


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