ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Seems a bug in setting Style.Orientation property (https://www.excelbanter.com/excel-programming/419960-seems-bug-setting-style-orientation-property.html)

Raja

Seems a bug in setting Style.Orientation property
 
Hi,

I set the Style.Orientation property to xlVertical as follow:

ActiveWorkbook.Styles("Normal") .Orientation = xlVertical

Looking on the value of the Orientation property after the assignment, it
still have
the xlHorizontal value. However In Cell Formats dialog, it appear correct

Any idea?

Raja

Jim Rech

Seems a bug in setting Style.Orientation property
 
I agree, seems to be a bug. I'm not sure how you would detect whether a
style has vertical alignment.

A related anomaly is, after doing this:

ActiveWorkbook.Styles("Normal").Orientation=xlVert ical

doing this has no effect:

ActiveWorkbook.Styles("Normal").Orientation=xlHori zontal

But if you interpose either of these:
ActiveWorkbook.Styles("Normal").Orientation=xlDown ward
ActiveWorkbook.Styles("Normal").Orientation=xlUpwa rd

then it does.

--
Jim
"Raja" wrote in message
...
| Hi,
|
| I set the Style.Orientation property to xlVertical as follow:
|
| ActiveWorkbook.Styles("Normal") .Orientation = xlVertical
|
| Looking on the value of the Orientation property after the assignment, it
| still have
| the xlHorizontal value. However In Cell Formats dialog, it appear correct
|
| Any idea?
|
| Raja


Raja

Seems a bug in setting Style.Orientation property
 
BUT i wonder how Excel Cell Format dialog could detect that!!!!
it seems to me there is a missing property

"Jim Rech" wrote:

I agree, seems to be a bug. I'm not sure how you would detect whether a
style has vertical alignment.

A related anomaly is, after doing this:

ActiveWorkbook.Styles("Normal").Orientation=xlVert ical

doing this has no effect:

ActiveWorkbook.Styles("Normal").Orientation=xlHori zontal

But if you interpose either of these:
ActiveWorkbook.Styles("Normal").Orientation=xlDown ward
ActiveWorkbook.Styles("Normal").Orientation=xlUpwa rd

then it does.

--
Jim
"Raja" wrote in message
...
| Hi,
|
| I set the Style.Orientation property to xlVertical as follow:
|
| ActiveWorkbook.Styles("Normal") .Orientation = xlVertical
|
| Looking on the value of the Orientation property after the assignment, it
| still have
| the xlHorizontal value. However In Cell Formats dialog, it appear correct
|
| Any idea?
|
| Raja



Jim Rech[_2_]

Seems a bug in setting Style.Orientation property
 
The Excel object model (and its bugs) has nothing to do with what Excel does
internally. Two different things entirely.

--
Jim
"Raja" wrote in message
...
BUT i wonder how Excel Cell Format dialog could detect that!!!!
it seems to me there is a missing property

"Jim Rech" wrote:

I agree, seems to be a bug. I'm not sure how you would detect whether a
style has vertical alignment.

A related anomaly is, after doing this:

ActiveWorkbook.Styles("Normal").Orientation=xlVert ical

doing this has no effect:

ActiveWorkbook.Styles("Normal").Orientation=xlHori zontal

But if you interpose either of these:
ActiveWorkbook.Styles("Normal").Orientation=xlDown ward
ActiveWorkbook.Styles("Normal").Orientation=xlUpwa rd

then it does.

--
Jim
"Raja" wrote in message
...
| Hi,
|
| I set the Style.Orientation property to xlVertical as follow:
|
| ActiveWorkbook.Styles("Normal") .Orientation = xlVertical
|
| Looking on the value of the Orientation property after the assignment,
it
| still have
| the xlHorizontal value. However In Cell Formats dialog, it appear
correct
|
| Any idea?
|
| Raja






All times are GMT +1. The time now is 01:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com