Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default C# Interop Shape xlMoveAndSize property doesn't stick

I create a shape and set the Placement as follows...

Excel.Shape myPicture = _ActiveSheet.Shapes.AddPicture(Location,
MsoTriState.msoFalse, MsoTriState.msoTrue, TargetLeft, TargetTop,
TargetWidth, TargetHeight);

myPicture.Placement = Excel.XlPlacement.xlMoveAndSize;

Problem is, the xlPlacement will not stick. The property remains as xlMove.
Even trying to force a change in the watch window deson't work.

Anyone knows what's going on (or whats wrong) here?

Thanks

BIG_j




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default C# Interop Shape xlMoveAndSize property doesn't stick

More Information, if it helps...

This only happens when the "Shape" is not a standard in-built Excel Shape


"BIG_j" wrote in message
...
I create a shape and set the Placement as follows...

Excel.Shape myPicture = _ActiveSheet.Shapes.AddPicture(Location,
MsoTriState.msoFalse, MsoTriState.msoTrue, TargetLeft, TargetTop,
TargetWidth, TargetHeight);

myPicture.Placement = Excel.XlPlacement.xlMoveAndSize;

Problem is, the xlPlacement will not stick. The property remains as
xlMove. Even trying to force a change in the watch window deson't work.

Anyone knows what's going on (or whats wrong) here?

Thanks

BIG_j






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default C# Interop Shape xlMoveAndSize property doesn't stick

In what way is 'ActiveSheet.Shapes.AddPicture(etc..' not a standard shape

Can you change the property manually, if so try changing
myPicture.Placement = Excel.XlPlacement.xlMoveAndSize;

to
myPicture.Placement = 1;

though not sure why that would fix if as you say xlMoveAndSize is found in
the library and works with a 'normal' shape.

Regards,
Peter T


"BIG_j" wrote in message
...
More Information, if it helps...

This only happens when the "Shape" is not a standard in-built Excel Shape


"BIG_j" wrote in message
...
I create a shape and set the Placement as follows...

Excel.Shape myPicture = _ActiveSheet.Shapes.AddPicture(Location,
MsoTriState.msoFalse, MsoTriState.msoTrue, TargetLeft, TargetTop,
TargetWidth, TargetHeight);

myPicture.Placement = Excel.XlPlacement.xlMoveAndSize;

Problem is, the xlPlacement will not stick. The property remains as
xlMove. Even trying to force a change in the watch window deson't work.

Anyone knows what's going on (or whats wrong) here?

Thanks

BIG_j








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
Manually changing a picture (shape) name property ker_01 Excel Discussion (Misc queries) 4 April 3rd 23 07:01 PM
Excel automation through .NET Interop: NumberFormat property looks like NumberFormatLocal martin durtschi Excel Programming 4 May 13th 14 07:39 PM
automatic shape property settings Luca[_6_] Excel Programming 2 July 12th 06 08:16 AM
Capturing Shape Name/Text from OnAction property William Bartusek Excel Discussion (Misc queries) 3 April 12th 05 06:38 PM
Invalid procedure call in use of Shape property?? No Name Excel Programming 2 August 26th 04 12:52 AM


All times are GMT +1. The time now is 02:05 PM.

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"