Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening workbook in same directory
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening workbook in same directory
You don't need to hard code the path. Use something like:
fname = "something.xls" Workbooks.Open Filename:=ThisWorkbook.Path & "\" & fname -- Gary''s Student - gsnu200765 "Andyjim" wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening workbook in same directory
Wow.. Good answer. Thanks
"Gary''s Student" wrote: You don't need to hard code the path. Use something like: fname = "something.xls" Workbooks.Open Filename:=ThisWorkbook.Path & "\" & fname -- Gary''s Student - gsnu200765 "Andyjim" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change current directory to the directory that the workbook loads from! | Excel Programming | |||
Opening a directory using code | Excel Programming | |||
opening directory from excel | Excel Programming | |||
opening directory from excel | Excel Programming | |||
opening a workbook in the current directory | Excel Programming |