I found this be searching the forum vba by VoG:
The line "ShapeRange.Fill" gives an error"Application-defined or object-defined error"
I did change the directory to one of my own, and still receive the error.
However, rather than open a directory, I would like to logic to open the folder dialog so that I could choose which image I want rather than auto selecting.
Can anyone assist me with this task?
Thanks,
Pujo
The line "ShapeRange.Fill" gives an error"Application-defined or object-defined error"
I did change the directory to one of my own, and still receive the error.
However, rather than open a directory, I would like to logic to open the folder dialog so that I could choose which image I want rather than auto selecting.
Can anyone assist me with this task?
Thanks,
Pujo
Code:
Sub yetanothe()Dim i As LongFor i = 10 To 100 With Range("B" & i) .AddComment .Comment.Text Text:="Owner:" & Chr(10) & "" .Comment.ShapeRange.Fill.UserPicture "C:\Users\Owner\Pictures\IRUS Diagrams\40" & i - 9 & ".jpg" End WithNext iEnd Sub</PRE>