Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use Excel functions in VBA (Excel 5)

Status
Not open for further replies.
Jun 6, 2001
26
AU
I have just tried to use an excel function inside some vba code i have written. The function i have used is the text() function. When I use the debugger it says "function not defined". What do i have to do to be able to use all of the built in functions of excel with in vba.

Thanks
 
More Information....

I am trying to use a cell that contains a date to name a range. I am relatively new to excel, and am frustrated by the way it handles dates (bearing in mind i use excel 5). I understand that i cant use certain characters in the range name that is why i am trying to convert the date to a string or something i can use to name the range.
 
If a date is in cell A1 on sheet1 then:

x$ = sheets("sheet1").cells(1,1)
MsgBox (x$)


If you want to return system date then:

x$ = date$
MsgBox (x$)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top