Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Aspect Ratio calender | Excel Discussion (Misc queries) | |||
How to control aspect ratio of X,Y axes? | Charts and Charting in Excel | |||
Aspect Ratio for Printing | Excel Programming | |||
Aspect Ratio in Excel Charts | Excel Discussion (Misc queries) | |||
Inserting CGM images in Excel changes image aspect ratio | Excel Programming |