Reputation: 31
When I programmed my code to make the user upload a picture, I tried to code it to get all image files, but it seems to only accept .bmp
files. So how can I code this for the sheet to accept all file types (.png, .jpg, .bmp, etc.)
?
imagefileformat = "Image Files (*.bmp),others, png (*.png), *.png, tif (*.tif),*.tif, jpg (*.jpg),*.jpg, All Files (*.*),*.*"
myPictureName = Application.GetOpenFilename(imagefileformat)
Upvotes: 0
Views: 272
Reputation: 31
Syntax is critical (and weird in this case, IYAM). Try
imagefileformat = "Image Files (*.bmp; *.png; *.tif; *.jpg),*.bmp;*.png;*.tif;*.jpg"
Upvotes: 1