Greetings JB,
When you get an error, try stepping thru the code to see where it goes KABOOM!. You can do this by clicking someplace in the Sub, and start pressing F8. You will see it highlight a line at a time; the highlighted line being the next statement to process.
Anyways, path not found would indicate that we didn't find the path to your folder. Change the Const to:
<font face=Courier New><SPAN style="color:#00007F">Const</SPAN> strPath <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN> = "G:\My Images\Lee's Family Albums\All Lee's Albums2\"</FONT>
Also - please note that I simply used the sheet's codename (Sheet1) when specifying the destination. If you have changed the tab name of the sheet, look in the project explorer window (usually upper-left) in VBIDE (the code window) and (let's say your sheet's tab name was "MySheet") you will see the sheet listed similar to:
Sheet1(MySheet)
In this case, Sheet1 is the codename and MySheet is the worksheet's name (or tab name).
So, you might need to either update it to the correct sheet's codename, or you can use the sheet's tab name like:
<font face=Courier New> ThisWorkbook.Worksheets("MySheet").Resize(UBound(aryJPGList)).Value = Application.Transpose(aryJPGList)</FONT>
I hope that makes sense; and of course you can alter a bit to include an input box to replace the Const.
@irobbo314:
Hi there,
Say, I don't use Dir very often, but I noted that if I used:
sfil = Dir(par & "*.*", vbDirectory)
...sfile would only return ".".
If I changed to: sfil = Dir(par & "*.*", vbNormal)
...then all the files in the folder would return.
If I changed to looking for just jpg's ("*.jpeg"), then either vbNormal or vbDirectory seems to work.
Does that make sense or am I missing something?
Mark