kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
Hello I need help:
I am looking for a way to make sure that when I have say
“Kelly mort” in the textbox and “mort kelly” in the image folder , I want it pick that file and show it in the control.
For example if I have name “A B C” Then “B C A”, “A C B”, “C A B”, etc are all valid.
I just got stacked.
Code:
Dim sfile$, fpath$
With Application
Fpath = ThisWorkbook.Path & .pathSeparator & “Pictures” & .pathSeparator
sFile = Dir(fPath & .PathSeparator & TextBox1.Text & “.*”)
Image1.Picture = LoadPicture(“”)
If sFile<>”” Then Image1.Picture = LoadPicture(fPath & .pathSeparator & sFile)
End With
I am looking for a way to make sure that when I have say
“Kelly mort” in the textbox and “mort kelly” in the image folder , I want it pick that file and show it in the control.
For example if I have name “A B C” Then “B C A”, “A C B”, “C A B”, etc are all valid.
I just got stacked.