how to transfer Excel project with all add-ins

deepakgoel

New Member
Joined
Jun 12, 2006
Messages
7
Hi,
I have one problem in transfer of my project from one comp to another..
I have used some add-ins like solver, euro tool and compare in VB Excel to develop my project. Now, when I transfered it from one computer to another, I have to again add all these add-ins.

Do I have to do this every time I change my system or everytime I give to to someone for testing?

Is there a way so that, I can save this project with all add-ins, such that if it is transfered from one computer to another, then there is need of installing all add-ins again.

the whole purpose of this exercise is to enable the testing of my project by different users on different systems.

please help me out....this problem will otherwise spoil my whole 1 year work!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi,

never done this before but tests looks promising

you can store a list of the installed add_ins on a (hidden) sheet
then run some code to install
(you could then delete the sheet or erase the range)

Code:
Option Explicit

Sub list_addins()
Dim Add_In As AddIn

    With Sheets(1)
    .Columns(1).ClearContents
    .Cells(1, 1) = "Installed addins"
        For Each Add_In In AddIns
        If Add_In.Installed Then .Cells(Rows.Count, 1).End(xlUp)(2) = Add_In.Title
        Next Add_In
    End With

End Sub

Sub install_addins_list()
Dim i As Long

    With Sheets(1)
        For i = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
        AddIns(.Cells(i, 1).Text).Installed = True
        Next i
    End With
    
End Sub
kind regards,
Erik

EDIT: corrected a typo
 
Upvote 0
not working.....

Hi,
first part is working fine.....but second part is not working at all....i mean no error is shown, but it is not even installing them.

can something else be done....
 
Upvote 0
Hi,

did you step through the code ? (using function key F8)
everybody can make typos and mistakes :-(
I saw the code jumping from
For i = 2 To .Cells(Rows.Count).End(xlUp).Row
to
End With
:huh:

this doesn't make sense
Cells(Rows.Count)
it must be
Cells(Rows.Count, 1)

I will edit the code above now

there is no error warning, perhaps I'll add that
kind regards,
Erik
 
Upvote 0
this is more "professional" ;-)
Code:
Sub install_addins_list()
Dim i As Long
Dim txt As String
Dim txt0 As String
Dim txt1 As String
Dim txt2 As String
Dim check As Boolean

    With Sheets(1)
    On Error Resume Next
        For i = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
        check = False
        check = AddIns(.Cells(i, 1).Text).Installed
                If Err Then
                Err.Clear
                txt2 = txt2 & vbLf & .Cells(i, 1)
                Else
                    If check Then
                    txt0 = txt0 & vbLf & .Cells(i, 1)
                    Else
                    AddIns(.Cells(i, 1).Text).Installed = True
                    txt1 = txt1 & vbLf & .Cells(i, 1)
                    End If
                End If
        Next i
    On Error GoTo 0
    End With
    
    If txt0 <> "" Then txt = txt & "already installed before running this procedure:" & txt0 & vbLf & vbLf
    If txt1 <> "" Then txt = txt & "installed by this procedure:" & txt1 & vbLf & vbLf
    If txt2 <> "" Then txt = txt & "could not be installed:" & txt2
    MsgBox txt, 0, "AddIns Install Log"

End Sub
 
Upvote 0
working with slight modifications..

HI erig,

by making a single change in code, it has started working. basically, it has to be:

AddIns(.Cells(i, 1).Value).Installed = True

it was not taking value from cells.

can this same method be applied for visual basic references! basically, i am using solver application thru Visual Basic, for this purpose we have to add Solver in VB references. What modifications are required for using this same procedure in VB ?

Deepak Goel
 
Upvote 0
I'm curious what the names of you addins were
Why would "value" work better than text, since the aad-in-titles are text. Perhaps you changed something else at the same time which made you think it was that change which made it work ?
I might be wrong: so I want to learn something... please tell me if it really makes a difference. (as you can imagine for me it worked: I used "text" in case an add-in-name would be purely numeric, than I'm sure you would have trouble)

about solver in VBA
please email me a little file with solver installed and some little code which needs it
I'll check it out

You might not be able to do this using code, but you can warn users with a good description how to add it ...
Anyway when sending a workbook it should be set and no further intervention of users would be needed.
So the problem can only occur when you send code-alone.

so expecting a little answer to my first question and - if you want - a little file in my mailbox
kind regards,
Erik
 
Upvote 0
your email
Hi erik,
My add-ins were Solver and Euro - Tool. With "text", the command was not reading the cell...whereas with value it was! I am not also able to figure out why this has happened! I use of Value instead of text was just an educated guess, because error shown to me was mismatch type. So, I thought it mayn't be taking character input, so better to change it to value (though in case of text it doesn't make difference. But sometime these types of bugs also works).

How do we set the file, so that all libraries used in code are automatically refered/installed on some other user computer also? Problem is in solver only...basically for using solver, we need to select solver.xla from References in Tools in VB. If that is properly selected, then only function works!
Of course I'm glad you tried to explain the text-value-problem, but please send your answers and questions within the thread and not by email: it's against the boardrules.
I only invited you to email a workbook so I could take a look and help...
about solver in VBA
please email me a little file with solver installed and some little code which needs it
I'll check it out

we need to select solver.xla from References in Tools in VB
record a macro: I cannot know the exact english "title" (which is different from the name) of the "solver"addin from here
you will get something like
Code:
AddIns("AddIn Solver").Installed = True
then you can insert this line in your code

greetings from Belgium
Erik
 
Upvote 0

Forum statistics

Threads
1,224,938
Messages
6,181,869
Members
453,068
Latest member
DCD1872

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top