Is it possible to modify this code so that it allows me to select .jpg-pictures?
Code:
Sub loopyarray()
Dim filenames As Variant
' set the array to a variable and the True is for multi-select
filenames = Application.GetOpenFilename(, , , , True)
counter = 1
' ubound determines how many items in the array
While counter <= UBound(filenames)
'Opens the selected files
Workbooks.Open filenames(counter)
' displays file name in a message box
MsgBox filenames(counter)
'increment counter
counter = counter + 1
Wend
End Sub