Resize any selected object
Do you want to resize all the pictures on that worksheet?
If yes:
Option Explicit
Sub testme()
Dim wks As Worksheet
Dim myPict As Picture
Set wks = ActiveSheet
With wks
For Each myPict In .Pictures
With myPict.ShapeRange
.LockAspectRatio = msoFalse
.Height = 70.5
.Width = 70.5
.Rotation = 0
End With
Next myPict
End With
End Sub
If only the selected pictu
Option Explicit
Sub testme()
If TypeName(Selection) = "Picture" Then
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 70.5
Selection.ShapeRange.Width = 70.5
Selection.ShapeRange.Rotation = 0#
Else
MsgBox "Please select a picture"
End If
End Sub
Pat wrote:
ActiveSheet.Shapes("Picture 1").Select
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 70.5
Selection.ShapeRange.Width = 70.5
Selection.ShapeRange.Rotation = 0#
The above will resize Picture 1. I want to resize any selected picture.
Much appreciate any help.
Pat
--
Dave Peterson
|