Thread: text to date
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default text to date

Hi Andrew,

Try:

'=============
Public Sub Tester002()
Dim DTE As Date

DTE = DateValue("12/2005")
MsgBox DTE

End Sub
'<<=============


---
Regards,
Norman



"andrew" wrote in message
oups.com...
Hi,
Is there a way that I can convert month and year numbers into dates in
vba analagous to the "=Date()" function in excel. For instance, how
can I convert 12/2005 into a date number in vba without using "=Date"
in a worksheet cell?

Thanks,
Andrew