Reggie Jardin
Member
Code:
Sub Insert_Picture2()
Dim lThisRow As Long, n As String, anyShape As Shape, l As Single, t As Single
Application.ScreenUpdating = False
lThisRow = 18
With ActiveSheet
Do While .Cells(lThisRow, 18).Value > ""
With .Cells(lThisRow, 18)
l = .Offset(, 2).Left
t = .Top
n =\\PicLocation\" & .Text
End With
If Dir(n) > "" Then
With .Pictures.Insert(n)
With .ShapeRange
.LockAspectRatio = msoFalse
.Height = 145
.Width = 100
.Rotation = 0
End With
.Top = t
.Left = l
.Placement = 1
End With
End If
lThisRow = lThisRow + 1
Loop
.Range("R20").Select
End With
Application.ScreenUpdating = True
MsgBox "Pic Inserted!"
End Sub
Hi I want to run this code in all sheets of my workbook.. can someone modify this code to run in all sheets of the workbook as all my sheet is having same cell reference.
Thanks in advance.
Last edited: