+ Reply to Thread
Results 1 to 3 of 3

HorizontalAlignment Error in Excel 97

  1. #1
    Registered User
    Join Date
    06-14-2005
    Posts
    41

    Question HorizontalAlignment Error in Excel 97

    Hi,

    I have a HorizontalAlignment line code that doesn't want to work. It says : "Error '1004' : Unable to set the HorizontalAlignment property of the Range class.". I am in Excel 97 and it is frustrating not being able to do such a simple task with VBA. It shouldn't be difficult. Cells are not even merged. Any ideas?

    Werner

    Please Login or Register  to view this content.

  2. #2
    K Dales
    Guest

    RE: HorizontalAlignment Error in Excel 97

    Try this:
    ..HorizontalAlignment = xlHAlignLeft

    --
    - K Dales


    "Werner" wrote:

    >
    > Hi,
    >
    > I have a HorizontalAlignment line code that doesn't want to work. It
    > says : "Error '1004' : Unable to set the HorizontalAlignment property
    > of the Range class.". I am in Excel 97 and it is frustrating not being
    > able to do such a simple task with VBA. It shouldn't be difficult.
    > Cells are not even merged. Any ideas?
    >
    > Werner
    >
    >
    > Code:
    > --------------------
    >
    >
    > Worksheets("Formulaire").Range("A6:AE11").Select
    > With Selection
    > .HorizontalAlignment = xlLeft
    > End With
    >
    > --------------------
    >
    >
    > --
    > Werner
    > ------------------------------------------------------------------------
    > Werner's Profile: http://www.excelforum.com/member.php...o&userid=24304
    > View this thread: http://www.excelforum.com/showthread...hreadid=392946
    >
    >


  3. #3
    Registered User
    Join Date
    06-14-2005
    Posts
    41
    It works! Thanks a lot!

    Regards,

    Werner

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1