ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Get the name of all workbooks open from access (https://www.excelbanter.com/excel-programming/348220-get-name-all-workbooks-open-access.html)

Xav[_2_]

Get the name of all workbooks open from access
 
I would like to create a routhine from access that get the Name of all
workbook open in my Windows session.


Jim Thomlinson[_4_]

Get the name of all workbooks open from access
 
Sub Test()
Dim wbk As Excel.Workbook

For Each wbk In Excel.Workbooks
MsgBox wbk.Name
Next wbk

End Sub

The only note with this is that if the user has multiple instances of Excel
oen then it will only look at the active instance.
--
HTH...

Jim Thomlinson


"Xav" wrote:

I would like to create a routhine from access that get the Name of all
workbook open in my Windows session.



Xav[_2_]

Get the name of all workbooks open from access
 
This code works from and to the current Excel instance.
The fact is if I have more than one instance of Excel open I don't know
how to access those instances. I suppose the answer might be to use
GetObject? But does anybody know how to look up all the Excel instance.


Jim Thomlinson[_4_]

Get the name of all workbooks open from access
 
I am affraid I can't help you there. I always keep things in one instance of
Excel. In my experience multiple instances is problematic at the best of
times...
--
HTH...

Jim Thomlinson


"Xav" wrote:

This code works from and to the current Excel instance.
The fact is if I have more than one instance of Excel open I don't know
how to access those instances. I suppose the answer might be to use
GetObject? But does anybody know how to look up all the Excel instance.




All times are GMT +1. The time now is 06:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com