LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default find full file path of running excel instance

That looks very good indeed !

Regards,
Peter T

"Rama" wrote in message
...
Hi,
Thanks to all. I found the suitable code in the following link. It

gives
the full path names of all running excel(saved and non saved) instances.

http://www.mrexcel.com/board2/viewto...37277&start=10
--
Cheers,
Rama


"Rama" wrote:

Hi Peter,
Thanks for the reply. How do you get arrXL ??
I know the list of process using Process library in .NET but dont know

what
you are referring to arrXL in the following message. Could you eloborate

bit
futher? I tried to understand the ROT code posted in google forums but

failed.
--
Cheers,
Rama


"Peter T" wrote:

It's not straightforward to find and reference multiple Excel

instances.
If you understand C# (could use in your .Net) a method was described

here -
http://tinyurl.com/yt36s5

In the same thread I briefly described my relatively though not 100%
reliable method to find and reference multiple Excel instances. Having

done
so, for each referenced instance you could do something like this

On Error resume next
For i = 0 to UBound(arrXL) ' array of XL instances
set ws = arrXL(i).Workbooks("abc.xls")
if not ws is nothing then
sFile = ws.Fullname
Exit for

Regards,
Peter T



"Rama" wrote in message
...
Hi ,
Thanks for the reply but the trouble is I can get the instance

full
path(bbc.xls) from Process library as illustarted in the following

link so
I
dont know how to instantiate this excel running instance as I dont

have
full
path.


http://forums.microsoft.com/MSDN/sho...06503&siteid=1



This following line works fine for unsaved excel instances

Set xlObj = VBA.GetObject("Book2").Application

but it fails to create reference whne it uses saved instance.

Set xlObj = VBA.GetObject("bbc").Application

it requires full path to access the currently running instance

Set xlObj = VBA.GetObject("c:\rama\bbc.xls").Application
--
Cheers,
Rama


"John Green" wrote:

ThisWorkbook.FullName

John Green

"Rama" wrote in message
...
Hi Experts,

Can anyone know how to findout the full path(

ex:
c:\rama\bbc.xls) from the curently running instance "bbc.xls". I

dont
mind
accepting VB6\.NET\Windows script solution for the same as i'm
desperate
to
find the full path from ruinng instance. Lets say I've opened

saved
bbc.xls
file and i know the currently opened instances from Process

library
and i
can
get the title("bbc.xls") but i dont know how to get the full
path("c:\rama\bbc.xls")

For more details please have a look at the following link.


http://forums.microsoft.com/MSDN/sho...06503&siteid=1


--
Cheers,
Rama








 
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
How to display full file path name in Excel 2007 Gary Roll Excel Discussion (Misc queries) 2 April 27th 23 07:48 PM
How to find a running Excel instance and access the worksheets in it. Gary Luo Excel Programming 2 February 15th 06 05:07 PM
Inserting Field To Insert Full Path to Excel File Will Excel Discussion (Misc queries) 3 February 11th 06 09:59 AM
full path of excel file Song Excel Discussion (Misc queries) 2 August 21st 05 06:50 PM
How to change the Excel Title Bar to show the full file path na... lmilkey8855 Excel Discussion (Misc queries) 2 January 6th 05 03:08 PM


All times are GMT +1. The time now is 08:53 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"