Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adjusting the size of a picture
I have the following code to insert photos into a workbook. I want to be able
to stretch the photo to fill up the range. The following code works great at inserting the pictures, but I think that the aspect ratio of the photo is locked so the picture doesn't stretch to fill the area. Is there anyway to change that? Workbooks("Dots").Activate For c = 1 To 5 Sheets("Sheet" & c).Activate Range("A42").Select Set photo(c) = ActiveSheet.Pictures.Insert(picLocation(c)) With photo(c) .Top = ActiveCell.Top .Left = ActiveCell.Left .Width = ActiveCell.Offset(14, 46).Left - .Left .Height = ActiveCell.Offset(14, 46).Top - .Top End With Next |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adjusting the size of a picture
I used the macro recorder to get this line
Selection.ShapeRange.LockAspectRatio = msoFalse so you should have photo(c).ShapeRange.LockAspectRatio = msoFalse "Brad" wrote: I have the following code to insert photos into a workbook. I want to be able to stretch the photo to fill up the range. The following code works great at inserting the pictures, but I think that the aspect ratio of the photo is locked so the picture doesn't stretch to fill the area. Is there anyway to change that? Workbooks("Dots").Activate For c = 1 To 5 Sheets("Sheet" & c).Activate Range("A42").Select Set photo(c) = ActiveSheet.Pictures.Insert(picLocation(c)) With photo(c) .Top = ActiveCell.Top .Left = ActiveCell.Left .Width = ActiveCell.Offset(14, 46).Left - .Left .Height = ActiveCell.Offset(14, 46).Top - .Top End With Next |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adjusting Column Size | Excel Discussion (Misc queries) | |||
Chart Picture Size in UserForm/Picture Control. | Excel Programming | |||
automatical cell size adjusting | Excel Discussion (Misc queries) | |||
Adjusting comment box size by Macro | Excel Discussion (Misc queries) | |||
adjusting cell size in spreadsheets | Excel Discussion (Misc queries) |