Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Test For Add-Ins

I have created a number of automated reports in Excel and now need to pass
the actual report generation on to a team of Analysts.

I order for these reports to run correctly, the user must have the €œAnalysis
ToolPak€ and the €œAnalysis ToolPak-VBA€ installed on their machine.

Is there a way I can test to see if these are installed without making the
user physically go to ToolsAdd-Ins and looking?

Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Test For Add-Ins

This will ensure the addins is being used.

On Error Resume Next ' turn off error checking
Set wbMyAddin = Workbooks(AddIns("analysis toolpak").Name)
lastError = Err
On Error GoTo 0 ' restore error checking
If lastError < 0 Then
' the add-in workbook isn't currently open. Manually open it.
Set wbMyAddin = Workbooks.Open(AddIns("analysis toolpak").FullName)
End If

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"RayportingMonkey" wrote:

I have created a number of automated reports in Excel and now need to pass
the actual report generation on to a team of Analysts.

I order for these reports to run correctly, the user must have the €œAnalysis
ToolPak€ and the €œAnalysis ToolPak-VBA€ installed on their machine.

Is there a way I can test to see if these are installed without making the
user physically go to ToolsAdd-Ins and looking?

Thanks for your help!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Test For Add-Ins

Normally the ATP addins should already exist in Addins collection (addin
manager ticked or unticked), though if not would need to be installed into
the collection via Office setup.

The second usage of the term 'installed', in context with addins, is to
actually load the addin. Following assumes the addin is already in the
Addins collection and if necessary loads it into Excel.

Sub InstalATP()
Dim sTitle As String
Dim adn As AddIn
Const ATP As String = "Analysis ToolPak"
Const ATP_VBA As String = "Analysis ToolPak - VBA"

On Error GoTo errH
sTitle = ATP
Set adn = Application.AddIns(sTitle)
If Not adn.Installed Then adn.Installed = True
If Not adn.Installed Then Err.Raise 12345

Set adn = Nothing
sTitle = ATP_VBA
Set adn = Application.AddIns(sTitle)
If Not adn.Installed Then
Application.SendKeys "{ESC}"
adn.Installed = True
End If
If Not adn.Installed Then Err.Raise 12345

Exit Sub
errH:
If adn Is Nothing Then
MsgBox sTitle & " does not appear to exist in the Addin manager"
Else
MsgBox "Problem installing " & sTitle
End If

End Sub

Regards,
Peter T

"RayportingMonkey" wrote in
message ...
I did a copy and paste of the code into into a macro as well as to try it

as
a declaration on the sheet. Neither worked for me. There was no result at
all. I also removed the Add-Ins I am testing for - again, no result at

all...

I also changed the Add-In name to the literal, mixed case text string of
"Analysis ToolPak" and even substitiuted the name that appears in the VB
Editor, which is FUNCRES.XLA, but again - no result.

Have I missed something?

PLEASE NOTE : I would like the result to appear in a cell on the

worksheet.
Something like "Analysis ToolPak = NOT INSTALLED" or "Analysis ToolPak =
VALIDATED".

Thanks

"Michael" wrote:

This will ensure the addins is being used.

On Error Resume Next ' turn off error checking
Set wbMyAddin = Workbooks(AddIns("analysis toolpak").Name)
lastError = Err
On Error GoTo 0 ' restore error checking
If lastError < 0 Then
' the add-in workbook isn't currently open. Manually open it.
Set wbMyAddin = Workbooks.Open(AddIns("analysis toolpak").FullName)
End If

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"RayportingMonkey" wrote:

I have created a number of automated reports in Excel and now need to

pass
the actual report generation on to a team of Analysts.

I order for these reports to run correctly, the user must have the

"Analysis
ToolPak" and the "Analysis ToolPak-VBA" installed on their machine.

Is there a way I can test to see if these are installed without making

the
user physically go to ToolsAdd-Ins and looking?

Thanks for your help!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Test T. Valko Excel Discussion (Misc queries) 0 May 26th 10 06:27 PM
test george New Users to Excel 0 March 3rd 10 05:30 PM
Can you help test our Excel test? Jeff[_14_] Excel Discussion (Misc queries) 1 December 7th 09 05:11 PM
Calculate mean of test scores from rows of test answers RiotLoadTime Excel Discussion (Misc queries) 1 July 26th 06 05:14 PM
test..where are my messages..test HT New Users to Excel 0 January 23rd 05 06:23 PM


All times are GMT +1. The time now is 02:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"