ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   open file in current directory (https://www.excelbanter.com/excel-worksheet-functions/172751-open-file-current-directory.html)

Tomo

open file in current directory
 
I have file run.xls in d:\xls\

in vb i need to open file open.xls in direcory from witch I opened run.xls,
this is d:\xls\

if i move or copy entire d:\xls into e:\xls i would like to open open.xls
from run.xls



eg
sub open ()
Workbooks.Open "d:\xls\open.xls"
end sub

this code will open open.xls from path d:\xls, but when i move or copy
entire d:\xls into e:\xls and start macro, error occurs

please help



Dave Peterson

open file in current directory
 
Check one of your other posts.

Tomo wrote:

I have file run.xls in d:\xls\

in vb i need to open file open.xls in direcory from witch I opened run.xls,
this is d:\xls\

if i move or copy entire d:\xls into e:\xls i would like to open open.xls
from run.xls

eg
sub open ()
Workbooks.Open "d:\xls\open.xls"
end sub

this code will open open.xls from path d:\xls, but when i move or copy
entire d:\xls into e:\xls and start macro, error occurs

please help


--

Dave Peterson


All times are GMT +1. The time now is 01:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com