Opening workbook in same directory

  • Thread starter Thread starter Andyjim
  • Start date Start date
A

Andyjim

Is the only way to open another workbook programatically from the workbook
that is currently open to use the Workbooks.Open filename:= command to supply
the path and the workbook name? Is there any way you can open another
workbook that resides in the same directory without supply the path?

Thanks much.

Andy
 
You don't need to hard code the path. Use something like:

fname = "something.xls"
Workbooks.Open Filename:=ThisWorkbook.Path & "\" & fname
 
Wow.. Good answer. Thanks

Gary''s Student said:
You don't need to hard code the path. Use something like:

fname = "something.xls"
Workbooks.Open Filename:=ThisWorkbook.Path & "\" & fname
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top