Finding a wroksheet in a specific location

S

stevehorton

Hi Guy/gals,

Is it possible to find a worksheet in a specific location?

I.e I have a location on the c drive where all my files are kept an
are saved as numbers i.e 1111, 2222 etc etc

Is it possible for a macro/ vb statement to go and find that file an
then open it (making it the active worksheet).

I expect this is very simple but i have never had to use the fin
function (*) before
 
B

Bernie Deitrick

Steve,

No need to find, if you already know the folder and file name:

Dim myWB As Workbook
Set myWB = Workbooks.Open("C:\Excel\1111.xls")

Unless the file might be in any of a number of subfolders, there is no need
to "Find" it.

HTH,
Bernie
MS Excel MVP
 
Top