Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 3rd, 2005, 03:01 PM
Authorized User
 
Join Date: Sep 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madda
Default Disable/Enable Excel Add-ins

Is this possible via VBA?

I cant figure it out :)

 
Old October 4th, 2005, 02:07 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

    AddIns("ODBC Add-in").Installed = False
    AddIns("ODBC Add-in").Installed = true

cheers

Matt

 
Old October 12th, 2005, 05:21 AM
Authorized User
 
Join Date: Sep 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madda
Default

excellent thanks for that, that sorted that problem!

How do i add an addin if it doesnt exist in their list of addins?

Something like:

if addins("Budgets").exist = false then
add the addin to the list
end if

Anyone know the code for this?

 
Old October 12th, 2005, 05:25 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Set myAddIn = AddIns.Add(Filename:="C:\MYADDIN.XLA", CopyFile:=True)

cheers

Matt

 
Old October 12th, 2005, 05:27 AM
Authorized User
 
Join Date: Sep 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madda
Default

cheers i will give that a go

How do i check whether it exists in their addins list? The installed switch just checks whether its checked in the list

 
Old October 12th, 2005, 05:38 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sub enableAddIn()
On Error Resume Next
    myAddInName = "MYADDIN"
    AddIns(myAddInName).Installed = True
    Debug.Print Err.Number & " - " & Err.description
    If Err.Number <> 0 Then
        Set myAddIn = AddIns.Add(Filename:="C:\" & myAddInName & ".XLA", CopyFile:=True)
        AddIns(myAddInName).Installed = True
    End If
On Error GoTo 0
End Sub

should work...
cheers

Matt

 
Old October 12th, 2005, 05:53 AM
Authorized User
 
Join Date: Sep 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madda
Default

thanks for that matt, it worked a treat :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Push button or Check Box in outlook add-ins capdevs VS.NET 2002/2003 0 January 7th, 2006 08:51 AM
VBE Add-ins crmpicco Excel VBA 0 May 11th, 2005 06:59 AM
Add-Ins jacemiles BOOK: Beginning Access VBA 0 February 2nd, 2004 12:40 PM
Modules and Add Ins jake Excel VBA 0 November 21st, 2003 08:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.