I have two pictures `LoginSchool` and `MyPic` and I need to copy all the formats applied on `LoginSchool` to the `myPic`. This is the basic code
Code: Select all
Sub FormatPicture()
Dim ws As Worksheet, picLoginSchool As Picture, picMyPic As Picture, t As Double, l As Double, w As Double, h As Double
Set ws = ThisWorkbook.Sheets(1)
Set picLoginSchool = ws.Pictures("LoginSchool")
Set picMyPic = ws.Pictures("MyPic")
With picLoginSchool
t = .Top
l = .Left
w = .Width
h = .Height
End With
With picMyPic
.Top = t
.Left = l
.Width = w
.Height = h
End With
End Sub