I was under the impression that you wanted something like this.
If so, change references as and where required.
The Cells in Column A need the filename without path and file extension.
Sub Maybe_Try_So() Dim PicturePath As String Dim CommentBox As Comment Dim i As Long Dim fn For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row '<---- Change the 1 to the first cell in Column A with a file name without extension fn = Dir("C:\Folder Name 1\Folder Name 2\Folder Name 3\" & Range("A" & i).Value & ".*") '<---- Change to actual Folder(s) If Len(Dir("C:\Folder Name 1\Folder Name 2\Folder Name 3\" & Range("A" & i).Value & ".*", vbDirectory)) <> 0 Then '<---- Change to actual Folder(s) PicturePath = fn Application.Range("A" & i).ClearComments Set CommentBox = Application.Range("A" & i).AddComment CommentBox.Text Text:="" CommentBox.Shape.Fill.UserPicture (PicturePath) CommentBox.Shape.Height = 20 '<---- Set size or use the AutoSize CommentBox.Shape.Width = 20 '<---- Set size or use the AutoSize 'CommentBox.Shape.TextFrame.AutoSize = True CommentBox.Visible = False Else End If Next i End Sub




Reply With Quote