muhammad susanto
Well-known Member
- Joined
- Jan 8, 2013
- Messages
- 2,102
- Office Version
- 365
- 2021
- Platform
- Windows
hi all..
i have code to enlarge image & resize, the code work properly but i want to adding Msg "Select one picture to enlarge" when running the code:
here this code:
how to make it?
any help, greatly appreciated..
.sst
i have code to enlarge image & resize, the code work properly but i want to adding Msg "Select one picture to enlarge" when running the code:
here this code:
VBA Code:
Dim shp As Shape
Dim big As Single, small As Single
Dim shpDouH As Double, shpDouOriH As Double
big = 1.5
small = 0.5
On Error Resume Next
Set shp = ActiveSheet.Shapes(Application.Caller)
With shp
shpDouH = .Height
.ScaleHeight 1, msoTrue, msoScaleFromTopLeft
shpDouOriH = .Height
If Round(shpDouH / shpDouOriH, 2) = big Then
.ScaleHeight small, msoTrue, msoScaleFromTopLeft
.ScaleWidth small, msoTrue, msoScaleFromTopLeft
.ZOrder msoSendToBack
Else
.ScaleHeight big, msoTrue, msoScaleFromTopLeft
.ScaleWidth big, msoTrue, msoScaleFromTopLeft
.ZOrder msoBringToFront
End If
End With
End Sub
how to make it?
any help, greatly appreciated..
.sst