I am opening an Excel spreadsheet in VBA. This is being
done through Automation from Access.
When the spreadsheet is opened the add-in 'Analysis
Toolpak' is turned on.
However, i cannot use functions of this add-in, such as
Weeknum.
Any Ideas?
Rgds
Stuart
Dave Peterson - 23 Sep 2003 03:15 GMT
This worked ok for me (but from MSWord):
Option Explicit
Sub testme01()
Dim xlobj As Object
Set xlobj = CreateObject("excel.application")
xlobj.Visible = True
xlobj.AddIns("analysis toolpak").Installed = False
xlobj.AddIns("analysis toolpak").Installed = True
'do your stuff
xlobj.Quit
Set xlobj = Nothing
End Sub
It shows up in the tools|Addins list, but isn't really loaded. You can see that
it's not there in the VBE (if you make the application visible and go into the
VBE.
> I am opening an Excel spreadsheet in VBA. This is being
> done through Automation from Access.
[quoted text clipped - 10 lines]
>
> Stuart

Signature
Dave Peterson
ec35720@msn.com