Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding xla
I'm running Office 2007 and would like to how to test if a particular Excel
addin (.xla) is already open within the current application. I have tried finding it as a workbook (see below) but .xla files are not included in the workbooks collection. Dim WB as Workbook, WA as Workbook For Each WB in Application.Workbooks If WB.Name = "MyAddin.xla" then Set WA = WB Exit For End if Next WB If Not WA is Nothing then ... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding xla
Dim wb As Workbook
Set wb = Nothing On Error Resume Next Set wb = Workbooks("personal.xla") On Error GoTo 0 If wb Is Nothing Then MsgBox "not open" Else MsgBox wb.FullName End If Fred wrote: I'm running Office 2007 and would like to how to test if a particular Excel addin (.xla) is already open within the current application. I have tried finding it as a workbook (see below) but .xla files are not included in the workbooks collection. Dim WB as Workbook, WA as Workbook For Each WB in Application.Workbooks If WB.Name = "MyAddin.xla" then Set WA = WB Exit For End if Next WB If Not WA is Nothing then ... -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding xla
I like Dave's suggestion because it works consistently for addins and
workbooks, but if you want to enumerate opened addins, here is another way: Dim ai As AddIn Dim wb as Workbook For Each ai In Application.AddIns If ai.Installed = True And ai.Name = "MyAddin.xla" Then Set wb = Workbooks(ai.Name) Exit For End If Next -- Tim Zych SF, CA "Fred" <leavemealone@home wrote in message ... I'm running Office 2007 and would like to how to test if a particular Excel addin (.xla) is already open within the current application. I have tried finding it as a workbook (see below) but .xla files are not included in the workbooks collection. Dim WB as Workbook, WA as Workbook For Each WB in Application.Workbooks If WB.Name = "MyAddin.xla" then Set WA = WB Exit For End if Next WB If Not WA is Nothing then ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding the top 10 | Excel Discussion (Misc queries) | |||
Finding non-zero value | Excel Discussion (Misc queries) | |||
Finding Same Row Value | Excel Programming | |||
finding value | Excel Discussion (Misc queries) | |||
finding a value | Excel Programming |