Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default find full file path of running excel instance

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 329
Default find full file path of running excel instance

Hi Rama,

ActiveWorkbook.Path
Returns the complete path of the ActiveWorkbook, excluding the final separator, as a string. See under 'Path' in Excel's VBE Help
file.

Cheers

--
macropod
[MVP - Microsoft Word]


"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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default find full file path of running excel instance

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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default find full file path of running excel instance

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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default find full file path of running excel instance

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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default find full file path of running excel instance

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






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default find full file path of running excel instance

Hi Rama

How do you get arrXL ??


That's the difficult bit. As I said, I briefly described my VBA method in
the thread I referred you to (message #6 in date view). It is clunky though,
especially the bit about DDE and adding a new workbook (unsaved BookX) if
necessary in instances with which to use GetObject to attach to it's parent
(ie the particular Excel instance).

If you are able to get the C# method working you're probably better to go
with that (I didn't get it working, probably down to me rather than the
method).

The point is there is no simple way to do what I think you are asking purely
to find the path of a file loaded in some Excel instance (surely some other
work around). If you have a very serious need and don't mind 'clunky' with a
LOT of VBA revert back.

Regards,
Peter T


"Rama" wrote in message
...
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








  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default find full file path of running excel instance

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






  #9   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








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
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 10:12 AM.

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

About Us

"It's about Microsoft Excel"