Left justified date/time in new cell ?

S

Samuel

This is my attempt to place the current date and time left justified
into a new cell. The xlLeft keeps giving me an RUN TIME ERROR error,
even though I see it being used in the newsgroup examples.....

ActiveSheet.Rows(1).Insert
ActiveSheet.HorizontalAlignment = xlLeft
ActiveSheet.Cells(1, 7) = Now()

Can anyone point me in the right direction? Thanks!
 
E

Elkar

You need to speifiy what you want to apply the Left Alignment to. Try this:

ActiveSheet.Rows(1).Insert
ActiveSheet.Cells(1, 7).HorizontalAlignment = xlLeft
ActiveSheet.Cells(1, 7) = Now()

HTH,
Elkar
 
S

Samuel

You need to speifiy what you want to apply the Left Alignment to. Try this:

ActiveSheet.Rows(1).Insert
ActiveSheet.Cells(1, 7).HorizontalAlignment = xlLeft
ActiveSheet.Cells(1, 7) = Now()

HTH,
Elkar







- Show quoted text -

That did the trick. Thank you.
 
Top