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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have this code in an excel macro.

Status
Not open for further replies.

JDU

Technical User
Dec 23, 2002
182
US
I have this code in an excel macro. I keep getting the error "Expected: expression." What's wrong with the syntax?

strDateString = Format(Currentsheet.Cells(1, 1).Value,"mm/dd/yyyy",,)

Thanks
 
Hi There,

You need:

strDateString = Format(ActiveSheet.Cells(1, _ 1).Value, "mm/dd/yyyy")

Rgds

John
 
Sorry mis-type !

Ignore the underscore b4 the second 1!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top