LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Chop picture in VBA?

Hi Guys,


I'm trying to chop a huge picture on a worksheet, so that it fits
exately into a square autofigure on the same worksheet.

The code I'm using is:

Counter = 0
Do While WS.Shapes(PictureName).Left < WS.Shapes(ShapeName).Left
WS.Shapes(PictureName).PictureFormat.CropLeft = _
WS.Shapes(PictureName).PictureFormat.CropLeft + 0.28
Counter = Counter + 1
If Counter 10000 Then Exit Do
Loop

....and the code works fine :-)

It chops the picture in the worksheet so that the left side of the
picture is exately at the left side of the autofigure...

....but...

....for sone strange reason the picture get distored, because the picture
aparrently automatically changes size during the process?!?

I've tried to avoid this by turning of aspect ratio, with
LockAspectRatio = msoFalse, but to no use...

And the absolutely worst thing is, that the units used for chopping are
not the same units used for sizing, so I can't resize according to the
choping afterwards!!!


What am I doing wrong - please, help???


TIA,

CE


 
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
Connect a number to a picture bank and import that picture to exce Dennis Hedo Excel Discussion (Misc queries) 1 March 22nd 10 02:17 PM
Chop off the last seven characters in a column Michael Grammas Excel Discussion (Misc queries) 1 August 10th 07 09:12 PM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
chop off extra characters in excel [email protected] Excel Discussion (Misc queries) 6 June 22nd 06 04:20 AM
Chop off parts of the statement 0-0 Wai Wai ^-^ Excel Worksheet Functions 1 April 23rd 06 10:01 AM


All times are GMT +1. The time now is 06:16 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"