ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Application.Function.Text" doesn't work (https://www.excelbanter.com/excel-programming/303525-application-function-text-doesnt-work.html)

Robin Clay[_3_]

"Application.Function.Text" doesn't work
 
Greetings!

Cell E20 contains =NOW()
and the format is set to "dd/mm/yyyy hh:mm"
which is what I want to use in my VBA Code

CopyDate = Range("E20").Value
gives Copydate in the format "dd/mm/yyyy hh:mm:ss,
but that is not what I want.

CopyDate = Application.Function.Text((Range
("E20").Value), "dd/mm/yyyy hh:mm")
generates a 438 error - Object doesn't support this
property or method

How can I overcome this?


RClay AT haswell DOT com

papou[_9_]

"Application.Function.Text" doesn't work
 
Hi Robin
Use Application.WorksheetFunction instead

HTH
Cordially
Pascal

"Robin Clay" a écrit dans le message
de ...
Greetings!

Cell E20 contains =NOW()
and the format is set to "dd/mm/yyyy hh:mm"
which is what I want to use in my VBA Code

CopyDate = Range("E20").Value
gives Copydate in the format "dd/mm/yyyy hh:mm:ss,
but that is not what I want.

CopyDate = Application.Function.Text((Range
("E20").Value), "dd/mm/yyyy hh:mm")
generates a 438 error - Object doesn't support this
property or method

How can I overcome this?


RClay AT haswell DOT com




Ron Rosenfeld

"Application.Function.Text" doesn't work
 
On Thu, 8 Jul 2004 03:23:52 -0700, "Robin Clay"
wrote:

Greetings!

Cell E20 contains =NOW()
and the format is set to "dd/mm/yyyy hh:mm"
which is what I want to use in my VBA Code

CopyDate = Range("E20").Value
gives Copydate in the format "dd/mm/yyyy hh:mm:ss,
but that is not what I want.

CopyDate = Application.Function.Text((Range
("E20").Value), "dd/mm/yyyy hh:mm")
generates a 438 error - Object doesn't support this
property or method

How can I overcome this?


RClay AT haswell DOT com


Try:

copydate = Range("E20").Text


--ron

Tom Ogilvy

"Application.Function.Text" doesn't work
 
CopyDate = Format(Range("E20").Value2, "dd/mm/yyyy hh:mm")

--
Regards,
Tom Ogilvy


"Robin Clay" wrote in message
...
Greetings!

Cell E20 contains =NOW()
and the format is set to "dd/mm/yyyy hh:mm"
which is what I want to use in my VBA Code

CopyDate = Range("E20").Value
gives Copydate in the format "dd/mm/yyyy hh:mm:ss,
but that is not what I want.

CopyDate = Application.Function.Text((Range
("E20").Value), "dd/mm/yyyy hh:mm")
generates a 438 error - Object doesn't support this
property or method

How can I overcome this?


RClay AT haswell DOT com





All times are GMT +1. The time now is 12:40 PM.

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