Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Unlocking Aspect Ratio For images

I am wondering how one Unlocks the aspect ratio for inserted images. The
2007 Macro recorder was poorly designed in comparison with 2003. (it seems
like it is missing alot) anyways it doesnt record the changes in size and
properties of the image when i record then manually change the properties
(uncheck Lock Aspect Ratio).

Thanks in Advance

Ironhydroxide
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Unlocking Aspect Ratio For images

Some aspects of the macro recorder appear not to have been designed at all,
yet only badly!

courtesy of 2003 -
Selection.ShapeRange.LockAspectRatio = msoFalse / msoTrue

or
myShape.LockAspectRatio = bFlag

Regards,
Peter T

"ironhydroxide" wrote in message
...
I am wondering how one Unlocks the aspect ratio for inserted images. The
2007 Macro recorder was poorly designed in comparison with 2003. (it
seems
like it is missing alot) anyways it doesnt record the changes in size
and
properties of the image when i record then manually change the properties
(uncheck Lock Aspect Ratio).

Thanks in Advance

Ironhydroxide



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Unlocking Aspect Ratio For images

Tried, and failed, (i am not so sure I like the changes in 2007)
Any other suggestions

Wait, One change (just thought of)
With ActiveSheet.Cells(PopRow, PopCol)
Set yourPic = ActiveSheet.Pictures.Insert(Picstring)
yourPic.ShapeRange.LockAspectRatio = msoFalse
yourPic.Width = Cells(PopRow, PopCol).Width
yourPic.Height = Cells(PopRow, PopCol).Height
yourPic.Top = Cells(PopRow, PopCol).Top
yourPic.Left = Cells(PopRow, PopCol).Left
End With


Thank you 2003 recorder.

and thanks for doing that for me, i have no access to 2003
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Unlocking Aspect Ratio For images

Before posting I tested LockAspectRatio in 2007 and it worked fine, both at
drawing-object level and to a shape object. At a glance your code below
should also work fine. You could also try Shapes.AddPicture

AddPicture(Filename As String, LinkToFile As MsoTriState, SaveWithDocument
As MsoTriState, Left As Single, Top As Single, Width As Single, Height As
Single) As Shape

Regards,
Peter T



"ironhydroxide" wrote in message
...
Tried, and failed, (i am not so sure I like the changes in 2007)
Any other suggestions

Wait, One change (just thought of)
With ActiveSheet.Cells(PopRow, PopCol)
Set yourPic = ActiveSheet.Pictures.Insert(Picstring)
yourPic.ShapeRange.LockAspectRatio = msoFalse
yourPic.Width = Cells(PopRow, PopCol).Width
yourPic.Height = Cells(PopRow, PopCol).Height
yourPic.Top = Cells(PopRow, PopCol).Top
yourPic.Left = Cells(PopRow, PopCol).Left
End With


Thank you 2003 recorder.

and thanks for doing that for me, i have no access to 2003



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
Aspect Ratio calender Joel Excel Discussion (Misc queries) 0 December 1st 09 11:55 AM
How to control aspect ratio of X,Y axes? JoeU2004 Charts and Charting in Excel 5 June 23rd 09 08:01 AM
Aspect Ratio for Printing Zone Excel Programming 0 November 11th 06 05:10 PM
Aspect Ratio in Excel Charts [email protected] Excel Discussion (Misc queries) 2 November 8th 05 01:17 AM
Inserting CGM images in Excel changes image aspect ratio Dinesh[_3_] Excel Programming 0 July 28th 04 09:47 PM


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