The help files for programming in excel are ridiculously atrocious. It's way
too hard to find what you are looking for.
What I want to know is how do I set the alignment (justification) of text in
a cell using vb code?
The help files for programming in excel are ridiculously atrocious. It's way
too hard to find what you are looking for.
What I want to know is how do I set the alignment (justification) of text in
a cell using vb code?
The "best" Excel help exists in XL 97. It responds much quicker and gives you "mush"
when you enter mush not "soup". I have/use three versions of XL, but use the XL 97
help for all of them. From that help file...
"HorizontalAlignment Property"
Returns or sets the horizontal alignment for the object. Read/write Long
For all objects, this can be one of the following XlHAlign constants:
xlHAlignCenter, xlHAlignDistributed, xlHAlignJustify, xlHAlignLeft, or xlHAlignRight.
In addition, for the Range or Style object, this property can be set to:
xlHAlignCenterAcrossSelection, xlHAlignFill, or xlHAlignGeneral.
This example left aligns the range A1:A5 on Sheet1...
Worksheets("Sheet1").Range("A1:A5").HorizontalAlignment = xlLeft
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
"Patch61" <Patch61@discussions.microsoft.com>
wrote in message
The help files for programming in excel are ridiculously atrocious. It's way
too hard to find what you are looking for.
What I want to know is how do I set the alignment (justification) of text in
a cell using vb code?
found it:
Worksheets("Sheet1").Range("A1:A5").HorizontalAlignment = xlLeft
"Patch61" wrote:
> The help files for programming in excel are ridiculously atrocious. It's way
> too hard to find what you are looking for.
>
> What I want to know is how do I set the alignment (justification) of text in
> a cell using vb code?
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks