Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Left justified date/time in new cell ?

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!

  #2   Report Post  
Posted to microsoft.public.excel.misc
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!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Left justified date/time in new cell ?

On Apr 27, 2:34 pm, Elkar wrote:
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!- Hide quoted text -


- Show quoted text -


That did the trick. Thank you.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can text be full-justified within a cell? Mainerbob Excel Discussion (Misc queries) 0 May 29th 06 06:55 PM
rows top-justified & bottom-justified in same sheet looks bad Jim 007 Excel Worksheet Functions 2 March 8th 06 11:56 PM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 03:36 PM
how to make number as text and left justified? mango Excel Worksheet Functions 1 February 21st 05 09:44 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 01:07 AM


All times are GMT +1. The time now is 10:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"