Hello Lilsnoop,
If you post your workbook it will be both easier and faster for me to customize the macro. Can you do post it? Here is the basic macro code. This adds one picture at a time.
Sub AddPictureToComment(ByRef Cell As Range, ByVal FolderPath As String, ByVal FileName As String)
Dim Cmnt As Excel.Comment
Dim Ext As String
If Right(FolderPath, 1) <> "\" Then FolerPath = FolderPath & "\"
Ext = Right(FileName, Len(FileName) - InStrRev(FileName, "."))
If Dir(FolderPath & FileName) = "" Then
MsgBox FolderPath & FileName & " not found.", vbCritical
Exit Sub
End If
Select Case Ext
Case Is = "bmp", "gif", "jpeg", "jpg", "png", "wmf"
Set Cmnt = Cell.Comment
If Cmnt Is Nothing Then
Set Cmnt = Cell.AddComment(Text:="")
End If
Cmnt.Shape.Fill.UserPicture FolderPath & FileName
End Select
End Sub
Sincerely,
Leith Ross
Bookmarks