Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
At this moment I use something like:
Set RptWkbk = Workbooks.Open(Filename:="Y:\ALL_USERS\Username\St atistics\Department 01\Individual Report.XLS") I have another file open in the same directory that does the above and that works wonders. However I would like it to point to the file with the name "Individual Report.XLS", but without the drive and such, so I can send it to people who are on a different machine. I tried the following, but it did not work: Set RptWkbk = Workbooks.Open(Filename:="Individual Report.XLS") Probably prety basic stuff, but I can't seem to figure it out. houghi -- Let's not be too tough on our own ignorance. It's the thing that makes America great. If America weren't incomparably ignorant, how could we have tolerated the last eight years? -- Frank Zappa, in 1988 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can you make sure that the workbook is in the same folder as the workbook
running the code: Set RptWkbk = Workbooks.Open(Filename:=thisworkbook.path & "\" & _ "Individual Report.XLS") or if you know that file is in the same workbook that is currently active Set RptWkbk = Workbooks.Open(Filename:=activeworkbook.path & "\" & _ "Individual Report.XLS") houghi wrote: At this moment I use something like: Set RptWkbk = Workbooks.Open(Filename:="Y:\ALL_USERS\Username\St atistics\Department 01\Individual Report.XLS") I have another file open in the same directory that does the above and that works wonders. However I would like it to point to the file with the name "Individual Report.XLS", but without the drive and such, so I can send it to people who are on a different machine. I tried the following, but it did not work: Set RptWkbk = Workbooks.Open(Filename:="Individual Report.XLS") Probably prety basic stuff, but I can't seem to figure it out. houghi -- Let's not be too tough on our own ignorance. It's the thing that makes America great. If America weren't incomparably ignorant, how could we have tolerated the last eight years? -- Frank Zappa, in 1988 -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dave Peterson wrote:
Can you make sure that the workbook is in the same folder as the workbook running the code: Set RptWkbk = Workbooks.Open(Filename:=thisworkbook.path & "\" & _ "Individual Report.XLS") Works great, thanks. houghi -- Let's not be too tough on our own ignorance. It's the thing that makes America great. If America weren't incomparably ignorant, how could we have tolerated the last eight years? -- Frank Zappa, in 1988 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro - Open all word files in a directory | Excel Worksheet Functions | |||
List of Files in A Directory | Excel Discussion (Misc queries) | |||
Backup files in separate directory? | Excel Worksheet Functions | |||
Files in a directory? | Excel Discussion (Misc queries) | |||
Load all files in a directory | Excel Discussion (Misc queries) |