ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   prob with TODAY() within a macro (https://www.excelbanter.com/excel-discussion-misc-queries/178138-prob-today-within-macro.html)

deepika :excel help[_2_]

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


Ron de Bruin

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



Fred Smith[_4_]

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




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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com