Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Using Solver add-in across multiple computers

I have a macro which makes use of the solver add-in.

I want multiple users on multiple machines (which may have Excel installed
in various paths or drives!) to be able to use this.

I have used the line

AddIns("Solver Add-In").Installed = True

to install the add-in at the start of the macro, and it works fine on my
machine however when I try to use it on any other machine it says :

Compile Error - Cannot find project or library.

How can I work the macro so that it correctly installs Solver on any machine?

Thanks

Phil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Using Solver add-in across multiple computers

I suspect those other machines have not installed Solver from the CD so
it's nowhere to be found on their hard drives and thus cannot be called up
from software -- it takes wetware to shove the CD in the drive, etc.

Bill

--------------------------

On Wed, 22 Feb 2006 01:34:50 -0800, Defoes Right Boot wrote:

I have a macro which makes use of the solver add-in.

I want multiple users on multiple machines (which may have Excel installed
in various paths or drives!) to be able to use this.

I have used the line

AddIns("Solver Add-In").Installed = True

to install the add-in at the start of the macro, and it works fine on my
machine however when I try to use it on any other machine it says :

Compile Error - Cannot find project or library.

How can I work the macro so that it correctly installs Solver on any machine?

Thanks

Phil

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Using Solver add-in across multiple computers

Hi Bill

I have not checked all the machines but on the one I did check I found
Solver on the hard disk, but in a different path to the one it is in on my
machine. Once I had manually installed it on this machine the macro worked
fine, but then I exited Excel and tried again and it came up with the same
error as previously.

Is there some way to automatically find Solver on the HD and install it at
the start of the macro or alternatively on opening the worksheet?

Phil

"Bill Martin" wrote:

I suspect those other machines have not installed Solver from the CD so
it's nowhere to be found on their hard drives and thus cannot be called up
from software -- it takes wetware to shove the CD in the drive, etc.

Bill

--------------------------

On Wed, 22 Feb 2006 01:34:50 -0800, Defoes Right Boot wrote:

I have a macro which makes use of the solver add-in.

I want multiple users on multiple machines (which may have Excel installed
in various paths or drives!) to be able to use this.

I have used the line

AddIns("Solver Add-In").Installed = True

to install the add-in at the start of the macro, and it works fine on my
machine however when I try to use it on any other machine it says :

Compile Error - Cannot find project or library.

How can I work the macro so that it correctly installs Solver on any machine?

Thanks

Phil


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Using Solver add-in across multiple computers

No way that I'm aware of, but there are a lot of more clever people than I
here who may provide you with an answer. Good luck.

Bill
------------------
On Wed, 22 Feb 2006 08:32:34 -0800, Defoes Right Boot wrote:

Hi Bill

I have not checked all the machines but on the one I did check I found
Solver on the hard disk, but in a different path to the one it is in on my
machine. Once I had manually installed it on this machine the macro worked
fine, but then I exited Excel and tried again and it came up with the same
error as previously.

Is there some way to automatically find Solver on the HD and install it at
the start of the macro or alternatively on opening the worksheet?

Phil

"Bill Martin" wrote:

I suspect those other machines have not installed Solver from the CD so
it's nowhere to be found on their hard drives and thus cannot be called up
from software -- it takes wetware to shove the CD in the drive, etc.

Bill

--------------------------

On Wed, 22 Feb 2006 01:34:50 -0800, Defoes Right Boot wrote:

I have a macro which makes use of the solver add-in.

I want multiple users on multiple machines (which may have Excel installed
in various paths or drives!) to be able to use this.

I have used the line

AddIns("Solver Add-In").Installed = True

to install the add-in at the start of the macro, and it works fine on my
machine however when I try to use it on any other machine it says :

Compile Error - Cannot find project or library.

How can I work the macro so that it correctly installs Solver on any machine?

Thanks

Phil


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default Using Solver add-in across multiple computers

Hi. Hope this helps. :)

Sub SolverInstall()
'// Dana DeLouis
Dim SolverPath As String
Dim wb As Workbook

On Error Resume Next
' Solver will have Focus if opened:
' So, remember ActiveWorkbook (adjust as needed)...
Set wb = ActiveWorkbook

SolverPath = Application.LibraryPath & "\SOLVER\SOLVER.XLA"

If Not AddIns("Solver Add-In").Installed _
Then AddIns("Solver Add-In").Installed = True

wb.VBProject.References.AddFromFile SolverPath

wb.Activate
End Sub

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"Bill Martin" wrote in message
...
No way that I'm aware of, but there are a lot of more clever people than I
here who may provide you with an answer. Good luck.

Bill
------------------
On Wed, 22 Feb 2006 08:32:34 -0800, Defoes Right Boot wrote:

Hi Bill

I have not checked all the machines but on the one I did check I found
Solver on the hard disk, but in a different path to the one it is in on
my
machine. Once I had manually installed it on this machine the macro
worked
fine, but then I exited Excel and tried again and it came up with the
same
error as previously.

Is there some way to automatically find Solver on the HD and install it
at
the start of the macro or alternatively on opening the worksheet?

Phil

"Bill Martin" wrote:

I suspect those other machines have not installed Solver from the CD so
it's nowhere to be found on their hard drives and thus cannot be called
up
from software -- it takes wetware to shove the CD in the drive, etc.

Bill

--------------------------

On Wed, 22 Feb 2006 01:34:50 -0800, Defoes Right Boot wrote:

I have a macro which makes use of the solver add-in.

I want multiple users on multiple machines (which may have Excel
installed
in various paths or drives!) to be able to use this.

I have used the line

AddIns("Solver Add-In").Installed = True

to install the add-in at the start of the macro, and it works fine on
my
machine however when I try to use it on any other machine it says :

Compile Error - Cannot find project or library.

How can I work the macro so that it correctly installs Solver on any
machine?

Thanks

Phil





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Using Solver add-in across multiple computers

Hi Dana

This has me confused now! Your macro seems to work fine but having run it
when I try and work solver on another machine it still says it can't find it.

This is even though when stepping through your macro, when hovering over "If
Not AddIns("Solver Add-In").Installed" it clearly says that evaluates to True.

I think I may have to do the solving manually instead as it's not a hugely
complex solver scenario!

Thanks for your help anyway...

Phil

"Dana DeLouis" wrote:

Hi. Hope this helps. :)

Sub SolverInstall()
'// Dana DeLouis
Dim SolverPath As String
Dim wb As Workbook

On Error Resume Next
' Solver will have Focus if opened:
' So, remember ActiveWorkbook (adjust as needed)...
Set wb = ActiveWorkbook

SolverPath = Application.LibraryPath & "\SOLVER\SOLVER.XLA"

If Not AddIns("Solver Add-In").Installed _
Then AddIns("Solver Add-In").Installed = True

wb.VBProject.References.AddFromFile SolverPath

wb.Activate
End Sub

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"Bill Martin" wrote in message
...
No way that I'm aware of, but there are a lot of more clever people than I
here who may provide you with an answer. Good luck.

Bill
------------------
On Wed, 22 Feb 2006 08:32:34 -0800, Defoes Right Boot wrote:

Hi Bill

I have not checked all the machines but on the one I did check I found
Solver on the hard disk, but in a different path to the one it is in on
my
machine. Once I had manually installed it on this machine the macro
worked
fine, but then I exited Excel and tried again and it came up with the
same
error as previously.

Is there some way to automatically find Solver on the HD and install it
at
the start of the macro or alternatively on opening the worksheet?

Phil

"Bill Martin" wrote:

I suspect those other machines have not installed Solver from the CD so
it's nowhere to be found on their hard drives and thus cannot be called
up
from software -- it takes wetware to shove the CD in the drive, etc.

Bill

--------------------------

On Wed, 22 Feb 2006 01:34:50 -0800, Defoes Right Boot wrote:

I have a macro which makes use of the solver add-in.

I want multiple users on multiple machines (which may have Excel
installed
in various paths or drives!) to be able to use this.

I have used the line

AddIns("Solver Add-In").Installed = True

to install the add-in at the start of the macro, and it works fine on
my
machine however when I try to use it on any other machine it says :

Compile Error - Cannot find project or library.

How can I work the macro so that it correctly installs Solver on any
machine?

Thanks

Phil




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default Using Solver add-in across multiple computers

Hi. If you put this in the beginning, what do you get?

If Dir(Application.LibraryPath & "\SOLVER\SOLVER.XLA") = vbNullString
Then
MsgBox "SOLVER.XLA not in Library Path"
Else
MsgBox "SOLVER.XLA appears to be in the correct location"
End If

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"Defoes Right Boot" wrote in
message ...
Hi Dana

This has me confused now! Your macro seems to work fine but having run it
when I try and work solver on another machine it still says it can't find
it.

This is even though when stepping through your macro, when hovering over
"If
Not AddIns("Solver Add-In").Installed" it clearly says that evaluates to
True.

I think I may have to do the solving manually instead as it's not a hugely
complex solver scenario!

Thanks for your help anyway...

Phil

"Dana DeLouis" wrote:

Hi. Hope this helps. :)

Sub SolverInstall()
'// Dana DeLouis
Dim SolverPath As String
Dim wb As Workbook

On Error Resume Next
' Solver will have Focus if opened:
' So, remember ActiveWorkbook (adjust as needed)...
Set wb = ActiveWorkbook

SolverPath = Application.LibraryPath & "\SOLVER\SOLVER.XLA"

If Not AddIns("Solver Add-In").Installed _
Then AddIns("Solver Add-In").Installed = True

wb.VBProject.References.AddFromFile SolverPath

wb.Activate
End Sub

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"Bill Martin" wrote in message
...
No way that I'm aware of, but there are a lot of more clever people
than I
here who may provide you with an answer. Good luck.

Bill
------------------
On Wed, 22 Feb 2006 08:32:34 -0800, Defoes Right Boot wrote:

Hi Bill

I have not checked all the machines but on the one I did check I found
Solver on the hard disk, but in a different path to the one it is in
on
my
machine. Once I had manually installed it on this machine the macro
worked
fine, but then I exited Excel and tried again and it came up with the
same
error as previously.

Is there some way to automatically find Solver on the HD and install
it
at
the start of the macro or alternatively on opening the worksheet?

Phil

"Bill Martin" wrote:

I suspect those other machines have not installed Solver from the CD
so
it's nowhere to be found on their hard drives and thus cannot be
called
up
from software -- it takes wetware to shove the CD in the drive, etc.

Bill

--------------------------

On Wed, 22 Feb 2006 01:34:50 -0800, Defoes Right Boot wrote:

I have a macro which makes use of the solver add-in.

I want multiple users on multiple machines (which may have Excel
installed
in various paths or drives!) to be able to use this.

I have used the line

AddIns("Solver Add-In").Installed = True

to install the add-in at the start of the macro, and it works fine
on
my
machine however when I try to use it on any other machine it says :

Compile Error - Cannot find project or library.

How can I work the macro so that it correctly installs Solver on any
machine?

Thanks

Phil






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default Using Solver add-in across multiple computers

I'm just curious. If you unload Solver, and then re-load, will that work?

Sub SolverInstall()
'// Dana DeLouis
Dim SolverPath As String
Dim wb As Workbook

SolverPath = Application.LibraryPath & "\SOLVER\SOLVER.XLA"

If Dir(SolverPath) = vbNullString Then
MsgBox "SOLVER.XLA not in Library Path"
Exit Sub
End If

On Error Resume Next
' Solver will have Focus if opened:
' So, remember ActiveWorkbook (adjust as needed)...
Set wb = ActiveWorkbook

AddIns("Solver Add-In").Installed = False
'// We remembered ActiveWorkbook before Solver gets Focus...
AddIns("Solver Add-In").Installed = True

wb.VBProject.References.AddFromFile SolverPath
wb.Activate
End Sub

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


<snip

"Defoes Right Boot" wrote in
message ...
Hi Dana

This has me confused now! Your macro seems to work fine but having run it
when I try and work solver on another machine it still says it can't find
it.

This is even though when stepping through your macro, when hovering over
"If
Not AddIns("Solver Add-In").Installed" it clearly says that evaluates to
True.

I think I may have to do the solving manually instead as it's not a
hugely
complex solver scenario!

Thanks for your help anyway...

Phil


<snip


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
hyperlink files on multiple computers Doug Excel Discussion (Misc queries) 5 August 24th 09 05:12 AM
Excel header different on multiple computers. JamalH Excel Discussion (Misc queries) 0 September 16th 08 09:07 PM
excel on multiple computers choice[_2_] Excel Programming 0 April 24th 05 09:45 PM
Editing from Multiple computers? inspectorgadget Excel Discussion (Misc queries) 2 December 23rd 04 06:52 PM
Installing Solver.xla in all computers by default Radha Krishna Excel Programming 1 November 16th 04 01:42 PM


All times are GMT +1. The time now is 10:55 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"