I have an image box in a userform. It is supposed to contain a User Profile Pic. By default it has a silhouette of a "person".
profile.jpg
As the user navigates to different people, the image box will change picture to a filename: .picture = loadpicture(filename). However, if no profile picture has ever been configured for that user, I want the silhouette of the "person" to appear, so users will know the box is supposed to contain a profile pic.
How to do this?
I dynamically change the pic using:
imagebox.picture = loadpicture(filename). So if the person is not configured with a picture file, then filename = "". Can I do something like this:
??? This obviously doesn't work, or I wouldn't come here.
I don't want the default pic to point to a file location, because the .xlsm file is supposed to be shareable, and the user may not have the default profile pic in the right folder structure. So what I want is that when the userform loads, I store the default pic somewhere, then when the selected person has no profile pic, then I set: imagebox.picture = DefaultPic
Please help. Thanks!
Bookmarks