View Single Post
 
Old 02-22-2015, 03:37 PM
Guessed's Avatar
Guessed Guessed is online now Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If you are getting a 'not valid file name error' then it is likely that a file with that name doesn't exist.

There is a difference between cstrPath and strPath - are you sure you are using the right variable when you open the connEmp? It looks like you intended to build the full path by getting the current path and appending the constant to point inside a folder BUT your code is not quite doing that.

Add the following lines before the connEmp.Open line to check the value of cstrPath and strPath

Debug.Print cstrPath
Debug.Print strPath
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote