Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default open file in current directory

Maybe...

sub myOpen()
Workbooks.Open thisworkbook.path & "\open.xls"
end sub

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to open most current file in folder Tasha Excel Discussion (Misc queries) 6 June 19th 07 03:36 PM
current directory Ross[_2_] Excel Discussion (Misc queries) 1 April 2nd 07 10:00 PM
Current Directory Mallasch Excel Discussion (Misc queries) 4 September 15th 06 03:05 AM
Excel should open documents in the folder of the current file boxfactory Setting up and Configuration of Excel 0 October 20th 05 03:35 PM
Excel Slow File Open Directory Response Dave P Excel Discussion (Misc queries) 0 September 30th 05 01:37 AM


All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"