NOT WORKING..Getting XLA files to work with Excel
My two cents ...
1.
Use the following Sub to discover where to store your xla :
Sub test()
MsgBox Application.TemplatesPath
end sub
Then one directory above look for an addin folder. Put your add in
there
2.
Once you've stored the addin into the right folder you must register it
with Excel.
From Excel go :
Tools-Addins
Check your add in to register it with Excel
3. I deal with the addin/not same workbook problem by opening a
template (or a workbook that's going to have the data) and then
accessing it as a variable
Sub LoadTemplateOrWorkbook
Dim book as Workbook
Set book = Workbooks.Open(Application.TemplatesPath +
"SomeTemplate.xlt")
book.Sheets("Somesheet").Visible = True ' Whatever just to show how to
access a sheeet
DoYourMacroHavingWorkbookArgument book
End Sub
|