Open files in the same directory
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
|