Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to open workbook without hardcoding path
Hi
Could anyone tell me how to open a workbook from another workbook, where both files are in the same folder, without hardcoding the path. I have tried code like this without success. Workbooks.open (path & "\somefile.xls") Thanks in advance Mick |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to open workbook without hardcoding path
Hi Michael,
Workbooks.open (path & "\somefile.xls") Workbooks.open thisworkbook.path & "\somefile.xls" Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to open workbook without hardcoding path
Hi Mick
Youre sooo close: Workbooks.Open ThisWorkbook.Path & "\somefile.xls" -- HTH. Best wishes Harald Followup to newsgroup only please "Michael Turner" skrev i melding ... Hi Could anyone tell me how to open a workbook from another workbook, where both files are in the same folder, without hardcoding the path. I have tried code like this without success. Workbooks.open (path & "\somefile.xls") Thanks in advance Mick |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to open workbook without hardcoding path
Hi,
Try Workbooks.open (ThisWorkbook.path & "\somefile.xls") ThisWorkbook in VBA is the one containing the code. regards Paul "Michael Turner" wrote in message ... Hi Could anyone tell me how to open a workbook from another workbook, where both files are in the same folder, without hardcoding the path. I have tried code like this without success. Workbooks.open (path & "\somefile.xls") Thanks in advance Mick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to see full path name of open workbook? | Excel Discussion (Misc queries) | |||
my vlookup path changes when I open the file | Excel Worksheet Functions | |||
How to find file-path of open workbook? | Excel Discussion (Misc queries) | |||
Macro to open Workbook in default path. | Excel Discussion (Misc queries) | |||
Checking if workbook open (where path is unknown) | Excel Programming |