Z
Zafar Iqbal
Dear Experts,
I got a Excel macro to paste pictures in Excel cell comments. It is working fine. Now, I need a change in it. Pictures should be rotated 270 degree & then pasted in cell comments. Can anybody help, please? Thanks in advance. code is mentioned below:-
Sub InsertPictures()
Dim cll As Range
Dim Rng As Range
Dim strPath As String
strPath = "D:\Photo Folder"
With Sheets("Sheet1")
Set Rng = Range("A2:A416")
End With
For Each cll In Rng
If Dir$(strPath & "\" & cll.Value & ".jpg") <> "" Then
With cll
.ClearComments
.AddComment ("")
.Comment.Shape.Fill.UserPicture (strPath & "\" & cll.Value & ".jpg")
.Comment.Shape.Height = 160
.Comment.Shape.Width = 120
.Comment.Shape.LockAspectRatio = msoTrue
End With
End If
Next cll
End Sub
I got a Excel macro to paste pictures in Excel cell comments. It is working fine. Now, I need a change in it. Pictures should be rotated 270 degree & then pasted in cell comments. Can anybody help, please? Thanks in advance. code is mentioned below:-
Sub InsertPictures()
Dim cll As Range
Dim Rng As Range
Dim strPath As String
strPath = "D:\Photo Folder"
With Sheets("Sheet1")
Set Rng = Range("A2:A416")
End With
For Each cll In Rng
If Dir$(strPath & "\" & cll.Value & ".jpg") <> "" Then
With cll
.ClearComments
.AddComment ("")
.Comment.Shape.Fill.UserPicture (strPath & "\" & cll.Value & ".jpg")
.Comment.Shape.Height = 160
.Comment.Shape.Width = 120
.Comment.Shape.LockAspectRatio = msoTrue
End With
End If
Next cll
End Sub