Variable Not in the cell

R

rebel1970

Hi there,

Can anyone help me.... I have a macro which copies a variable to
cell.

The variable format will always be dd/mm/yyyy

However, this information makes its way to the cell but it doesnt see
to be the value of the cell.... its almost as if it is text sitting o
the cell and not a value. Like for example ="22/09/2008"

Any help much appreciated
 
T

Tom Ogilvy

Dim dt as Date
dt = Cdate("22/09/2008")
ActiveCell.Value = dt
ActiveCell.Numberformat = "dd/mm/yyyy"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top