Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use something like
Workbooks.Open ThisWorkbook.Path & "\Invoice.xls" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "properties" wrote in message ... Sorry I didn't make my question clear. I want to write this code so that regardless of where I put this workbook it will look to open the file in the directory where the workbook exists. "cucchiaino" wrote in message ... properties wrote: How can I rewrite this code to open a file named "invoice", in case I move the workbook to another directory. Workbooks.OpenText Filename:= _ "C:\Documents and Settings\Owner\My Documents\\Project\Summary\Test_Macro\invoice" Workbooks.OpenText Filename:= _ "C:\newdirectory\invoice" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel will not open in default file location | Excel Discussion (Misc queries) | |||
Open Last Modified File form Location | Excel Discussion (Misc queries) | |||
VBA to ask for file location and use to open DB | Excel Worksheet Functions | |||
Open File from FTP Location | Excel Discussion (Misc queries) | |||
Open From Read-Only Location ? | Excel Discussion (Misc queries) |