Installation of "Add-Ins" in code

G

Guest

When my Excel workbook is opened, I want the Excel code to check to see if
the Add-Ins "Analysis Toolpack" is already installed on the user's Excel
application. Because I am using several of the Analysis Toolpack functions
in my worksbook, I need the Add-Inns to be installed. If it isn't installed,
how do I code Excel to automatically install the "Add-Ins" when the workbook
is opened?

Similary, I need the Tools > Options > Calculation to be on MANUAL for the
workbook to function normally. Am I able to include that in my code?

Thanks in anticipation

Bill Hall
 
G

Guest

add-ins no idea but calculation

application.calculation = xlmanual

application.calculation = xlautomatic
to return to normal
 
T

Tom Ogilvy

Calculation is an application level setting and it is utilized before your
code would run, so you can't control that for the opening of your workbook.

Sub AddinInstall()
With Application.AddIns("Analysis Toolpak - VBA")
If .Installed = False Then
.Installed = True
End If
End With
With Application.AddIns("Analysis Toolpak")
If .Installed = False Then
.Installed = True
End If
End With
End Sub
 
G

Guest

hi Ben, thanks for that; strange how we asked a similar question re Add-Ins
almost at the same time!

Bill
 
C

Chip Pearson

There's no need to test whether its installed or not. Just set
the Installed property to true. There's no harm if it is already
installed.

Application.AddIns("Analysis ToolPak").Installed = True



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
G

Guest

thanks Tom, re the calculation: I appreciate what you are saying, but can I
alter calculation to manual ONCE the workbook is opened? This might be OK if
I can - I guess that I wasn't precise enough in my question

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top