Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Rotate Fill Effect With Shape in VBA

I have a little routine that replaces the data points on an X-Y chart series
with arrows pointing in the direction of the line. That part works fine.

The arrows are gradient filled block arrows, rotated to the proper angle for
each data point. The arrows start out horizontal, with a horizontal
one-color gradient fill.

When I rotate the arrows, the gradient fill is not rotating with them - it
stays horizontal. I recorded a macro to get the VBA code to set the gradient
fill. I am trying to figure out what property I need to set to emulate the
"Rotate fill effect with shape" check box option in the "Fill
Effects.../Gradient" dialog box. When I record macros with and without that
box checked, there is no difference in the code.

Do any of you know what the VBA code is to set that option?

TIA,

Eric

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Rotate Fill Effect With Shape in VBA

In theory this should do it

shp.Fill.RotateWithObject = msoTrue ' msoFalse

http://msdn.microsoft.com/en-us/library/bb242619.aspx

However the code fails for me trying to write. Read the value always returns
msoFalse 0 irrespective of the actual setting. Looks like a bug.

Regards,
Peter T

"EricG" wrote in message
...
I have a little routine that replaces the data points on an X-Y chart
series
with arrows pointing in the direction of the line. That part works fine.

The arrows are gradient filled block arrows, rotated to the proper angle
for
each data point. The arrows start out horizontal, with a horizontal
one-color gradient fill.

When I rotate the arrows, the gradient fill is not rotating with them - it
stays horizontal. I recorded a macro to get the VBA code to set the
gradient
fill. I am trying to figure out what property I need to set to emulate
the
"Rotate fill effect with shape" check box option in the "Fill
Effects.../Gradient" dialog box. When I record macros with and without
that
box checked, there is no difference in the code.

Do any of you know what the VBA code is to set that option?

TIA,

Eric



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Rotate Fill Effect With Shape in VBA

Thanks for the input.

When I'm in the debugger, my block arrow shape does not have a
"RotateWithObject" property underneath the "Fill" property, so there is not
way to set it. I'm not sure if this is because it's an autoshape or what,
but if the property is not there, then there is no way to set it. Perhaps
it's just not exposed in the VBA object model?

I'll keep looking, but you are probably right about the bug.

Thanks,

Eric

"Peter T" wrote:

In theory this should do it

shp.Fill.RotateWithObject = msoTrue ' msoFalse

http://msdn.microsoft.com/en-us/library/bb242619.aspx

However the code fails for me trying to write. Read the value always returns
msoFalse 0 irrespective of the actual setting. Looks like a bug.

Regards,
Peter T


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Rotate Fill Effect With Shape in VBA

P.S. - the MSDN reference is for 2007. I'm still running 2003.
--
..-------------------:
If toast always lands butter-side down, and cats always land on their feet,
what happen if you strap toast on the back of a cat and drop it?
Steven Wright (1955 - )


"Peter T" wrote:

In theory this should do it

shp.Fill.RotateWithObject = msoTrue ' msoFalse

http://msdn.microsoft.com/en-us/library/bb242619.aspx

However the code fails for me trying to write. Read the value always returns
msoFalse 0 irrespective of the actual setting. Looks like a bug.

Regards,
Peter T

"EricG" wrote in message
...
I have a little routine that replaces the data points on an X-Y chart
series
with arrows pointing in the direction of the line. That part works fine.

The arrows are gradient filled block arrows, rotated to the proper angle
for
each data point. The arrows start out horizontal, with a horizontal
one-color gradient fill.

When I rotate the arrows, the gradient fill is not rotating with them - it
stays horizontal. I recorded a macro to get the VBA code to set the
gradient
fill. I am trying to figure out what property I need to set to emulate
the
"Rotate fill effect with shape" check box option in the "Fill
Effects.../Gradient" dialog box. When I record macros with and without
that
box checked, there is no difference in the code.

Do any of you know what the VBA code is to set that option?

TIA,

Eric




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Rotate Fill Effect With Shape in VBA

Ah, OK.

Well there doesn't appear to be the equivalent of a RotateWithObject
property exposed at all in 2003/VBA, so can't even say it's a bug!

Regards,
Peter T

"EricG" wrote in message
...
P.S. - the MSDN reference is for 2007. I'm still running 2003.
--
.-------------------:
If toast always lands butter-side down, and cats always land on their
feet,
what happen if you strap toast on the back of a cat and drop it?
Steven Wright (1955 - )


"Peter T" wrote:

In theory this should do it

shp.Fill.RotateWithObject = msoTrue ' msoFalse

http://msdn.microsoft.com/en-us/library/bb242619.aspx

However the code fails for me trying to write. Read the value always
returns
msoFalse 0 irrespective of the actual setting. Looks like a bug.

Regards,
Peter T

"EricG" wrote in message
...
I have a little routine that replaces the data points on an X-Y chart
series
with arrows pointing in the direction of the line. That part works
fine.

The arrows are gradient filled block arrows, rotated to the proper
angle
for
each data point. The arrows start out horizontal, with a horizontal
one-color gradient fill.

When I rotate the arrows, the gradient fill is not rotating with them -
it
stays horizontal. I recorded a macro to get the VBA code to set the
gradient
fill. I am trying to figure out what property I need to set to emulate
the
"Rotate fill effect with shape" check box option in the "Fill
Effects.../Gradient" dialog box. When I record macros with and without
that
box checked, there is no difference in the code.

Do any of you know what the VBA code is to set that option?

TIA,

Eric






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
How can I rotate objects in draw without changing shape? oldgunnersmate New Users to Excel 1 October 17th 08 07:21 PM
Where do I find buttons to change shape to 3-D and rotate in 2007 Zagrijs Venter Excel Discussion (Misc queries) 0 April 24th 08 01:32 PM
How do I rotate a triangle diagram shape. Rellim Excel Discussion (Misc queries) 1 January 24th 08 06:48 PM
Rotate a Shape CLR Excel Programming 7 November 15th 06 02:04 AM
R1C1 seems to effect listbox fill in VBA Steve[_59_] Excel Programming 1 May 4th 04 03:03 AM


All times are GMT +1. The time now is 06:16 AM.

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

About Us

"It's about Microsoft Excel"