LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default How to reference a file in a different instance of Excel?

On Jul 29, 6:40*am, ryguy7272 wrote:
On Jul 29, 2:32*am, Javed wrote:

Filename contains extension


BookName = Mid(Fname, InStrRev(Fname, "/") + 1)


In the above line Mid returns from last "/" to end of Fname.


Suggestion:


BookName = Mid(Fname, InStrRev(Fname, "/") + 1,InStr(Fname,".xls")-
InStrRev(Fname, "/") -1)


Pls confirm.


Nope, that gives me the file name, but without the ".xls". *So, i
simply concatenated a ".xls" onto the end. *Now, I have the file name
and the extension, but it STILL WON'T SAVE. *I can't figure it out!!

Error is still on this line:
Set wb = Workbooks(Index:=BookName)

Error mssg is 'subscript out of range'.

Any thoughts?


Got it working!! I had some help from a colleague in my office.
Thanks Mandeep!!


 
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
Get reference to a file opened in another instance of XL XP Excel Programming 1 July 25th 08 07:30 PM
Separate Window/Instance Per Excel File Gemini Excel Discussion (Misc queries) 1 April 2nd 08 01:48 PM
Force a File to Open in a New Excel Instance Brandt Excel Programming 3 March 11th 08 06:33 PM
How to open a new instance of EXCEL and .xls file Launchnet Excel Worksheet Functions 10 June 19th 07 03:45 PM
Set up Excel to start new instance for each new file opened. Minimal_Subset Excel Discussion (Misc queries) 2 May 12th 05 01:36 AM


All times are GMT +1. The time now is 08:44 AM.

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"