View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
okrob okrob is offline
external usenet poster
 
Posts: 142
Default Open Workbooks present in the same directory

On Apr 30, 12:51 pm, wrote:
Hi,

I am creating a macro that will use data that resides in the same
directory as the file that has the macro code.

My Macro runs like this:

Workbooks.Open "Slash Daily Case Closed.xls"

When I open the file (reports.xls) from explorer and run the macro it
gives me error 1004.

However, when i use File Open and open reports.xls, the macro runs
perfectly fine.

Any help would be greatly appreciated.


You need to give the full path... Workbooks.Open "C:\Documents and
Settings\Admin\Desktop\reports.xls" and it'll work both ways...