macro help format date

Mstest / Awrdacpi
December 29, 2010 at 13:59:36
Specs: Microsoft Windows XP Professional, 2 GHz / 958 MB
I'd already have a macro and an error is appearing for this macro

Sheets("VM Tracker").Range("E" & Rw).Value = Now
Sheets("VM Tracker").Range("E65536").End(xlUp).Select
Selection.NumberFormat = "mm/dd/yyyy"

Basically I wanted All Column E be formatted as mm/dd/yyyy format.

PLEASE HELP!

Thanks.


See More: macro help format date

Report •

#1
December 29, 2010 at 17:12:08
re: "an error is appearing for this macro"

Are you expecting us to guess at which of the hundreds of possible errors you are getting? Imagine how much more help we could be if you were just a tad bit more specific.

Oh, what the heck, I'll play along.

You are getting:

Run-time error '1004':
Application-defined or object-defined error

Do I get bonus points if I tell you why you are getting this error?

OK, how about this?

Rw = 0

How'd I do?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
December 29, 2010 at 17:26:10
Sorry for not including the type of error.

Yes you are correct it is
Run-time error '1004':
Application-defined or object-defined error

Thanks.


Report •

#3
December 29, 2010 at 17:54:49
And is it because Rw = 0?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Related Solutions

#4
December 29, 2010 at 18:12:45
no it is

Rw = Sheets("VM Tracker").Range("A65536").End(xlUp).Row + 1

so that when I transfer the data from Sheet1 it will transfer to the last empty row.

when I delete Sheets("VM Tracker").Range("E65536").End(xlUp).Select
Selection.NumberFormat = "mm/dd/yyyy"

Ithe macro will run and when I return it again, macro will run again but after saving the file the runtime error 1004 will come out again.


Report •

Ask Question