Option Explicit
Dim fd As Boolean
Sub EnlargePicture()
Call Picture_Click
End Sub
Sub Picture_Click()
Dim i, j As Long
Dim sh As Shape
i = 200
j = 300
Set sh = ActiveSheet.Shapes(Application.Caller)
fd = fd Xor True
With sh
If fd Then
.Width = i
.Height = j
Else
.Width = .TopLeftCell.ColumnWidth
.Height = .TopLeftCell.RowHeight
End If
End With
End Sub
Note:
- Adjust i and j according to requirements
How it works:
- It will enlarge the picture when you click on it
- It will resize to original size when you re-click on it
No comments:
Post a Comment