Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Name "C:\FOTO\*.jpg"

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Sep 6, 2007
418
BE
Possible its a syntaxis problem, the first part of the instruction *.jpg is refused by access. How can I say take all files under the directory with extension .jpg ?

Code:
Name "C:\FOTO\*.jpg" As "C:\FOTO\" & strPBL & ".jpg"
 
The VBA help clearly states that you can't use wildcard character with the NAME ... AS instruction.
Have a look at the Dir function.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top