Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 3rd, 2005, 03:01 PM
Authorized User
 
Join Date: Sep 2005
Location: , , .
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 :)

Reply With Quote
  #2 (permalink)  
Old October 4th, 2005, 02:07 AM
Friend of Wrox
 
Join Date: Jan 2005
Location: Bournemouth, Dorset, United Kingdom.
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

Reply With Quote
  #3 (permalink)  
Old October 12th, 2005, 05:21 AM
Authorized User
 
Join Date: Sep 2005
Location: , , .
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?

Reply With Quote
  #4 (permalink)  
Old October 12th, 2005, 05:25 AM
Friend of Wrox
 
Join Date: Jan 2005
Location: Bournemouth, Dorset, United Kingdom.
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

cheers

Matt

Reply With Quote
  #5 (permalink)  
Old October 12th, 2005, 05:27 AM
Authorized User
 
Join Date: Sep 2005
Location: , , .
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

Reply With Quote
  #6 (permalink)  
Old October 12th, 2005, 05:38 AM
Friend of Wrox
 
Join Date: Jan 2005
Location: Bournemouth, Dorset, United Kingdom.
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

Reply With Quote
  #7 (permalink)  
Old October 12th, 2005, 05:53 AM
Authorized User
 
Join Date: Sep 2005
Location: , , .
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 :)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


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



All times are GMT -4. The time now is 06:41 AM.


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