-2

Is it possible to use a wild card for a file extension?

ImageDir = CurrentProject.Path & "\Images\Invitory Items\" & Me.ListInvent.Column(1, r) & ".*"

The above is not working. Google doesn't offer much.

Community
  • 1
  • 1
Quint
  • 530
  • 2
  • 8
  • 23
  • Possible duplicate of [Using a wildcard to open an excel workbook](https://stackoverflow.com/questions/19527415/using-a-wildcard-to-open-an-excel-workbook) – Jeffrey Apr 30 '18 at 00:19
  • 1
    One line of code and "not working" isn't much to go on. – Tim Williams Apr 30 '18 at 00:20
  • @TimWilliams There is not much to it. Just trying to find a way to reference a file that could have any number of file types. (E.g: .jpg, .png, .ico, .gif, ect...) – Quint Apr 30 '18 at 00:26

1 Answers1

0
iDir = Dir(CurrentProject.Path & "\Images\InvitoryItems\" & Me.ListInvent.Column(1, r) & ".*")
ImageDir = CurrentProject.Path & "\Images\InvitoryItems\" & iDir
Quint
  • 530
  • 2
  • 8
  • 23