View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Elkar Elkar is offline
external usenet poster
 
Posts: 964
Default Left justified date/time in new cell ?

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


"Samuel" wrote:

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!