View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Javed Javed is offline
external usenet poster
 
Posts: 91
Default How to reference a file in a different instance of Excel?

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.