Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default solver.xla problems migrating from Excel'97 to 2003

hi,

at work, we are currently upgrading from Win200 to XP and from Excel '97 to
Excel 2003. We have hundreds/thousands of spreadsheets that include in the
VBA projects code like:

Application.ExecuteExcel4Macro "Solver.xla..."

This no longer works in Excel 2003. It does not produce an error, but seems
to do nothing. The code is easy to rewrite by adding a reference to
solver.xla and calling the functions as normal in VBA. The problem is that I
would have to replace the code in all the hundreds/thousands of scientific
spreadsheets that have already been created. I need to have a solid credible
reason to tell my boss why I am going to need a lot more time to do my part
of the migration, more than just something like "I think Microsoft have
stopped supporting the old macro language". I need to KNOW. And that was
just a guess anyway. Does anyone know why the above code does not work in
Excel 2003, while it is fine in Excel'97? Also, is there a update/patch
available from Microsoft to fix the problem? Basically, is there any way I
can avoid having to rewrite the code?

Thanks in advance,
Chris


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default solver.xla problems migrating from Excel'97 to 2003

Deborah/Chris,
Since you have no help so far, I will stick my neck out here...

XL4 macros should work in XL2003. However, Microsoft is trying
to come up with some way to eliminate them in post XL12 versions
without making too many people mad.

You mention that the code works if you set a reference to the
Solver add-in. That sounds as if your code depends on the Solver
add-in being installed by the user. A new Installation of Excel
would certainly not load any add-ins.

I would think that an IT department should be able to create and run a
script that would load the Solver add-in on networked units using Excel.
Suggest you see what they have to say.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Deborah Digby"

wrote in message
hi,
at work, we are currently upgrading from Win200 to XP and from Excel '97 to
Excel 2003. We have hundreds/thousands of spreadsheets that include in the
VBA projects code like:

Application.ExecuteExcel4Macro "Solver.xla..."

This no longer works in Excel 2003. It does not produce an error, but seems
to do nothing. The code is easy to rewrite by adding a reference to
solver.xla and calling the functions as normal in VBA. The problem is that I
would have to replace the code in all the hundreds/thousands of scientific
spreadsheets that have already been created. I need to have a solid credible
reason to tell my boss why I am going to need a lot more time to do my part
of the migration, more than just something like "I think Microsoft have
stopped supporting the old macro language". I need to KNOW. And that was
just a guess anyway. Does anyone know why the above code does not work in
Excel 2003, while it is fine in Excel'97? Also, is there a update/patch
available from Microsoft to fix the problem? Basically, is there any way I
can avoid having to rewrite the code?

Thanks in advance,
Chris


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default solver.xla problems migrating from Excel'97 to 2003

List all of the solver commands you're using, not this abbreviated one.
There may be one or two lines omitted which cause your issues.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Deborah Digby" wrote in message
...
hi,

at work, we are currently upgrading from Win200 to XP and from Excel '97
to
Excel 2003. We have hundreds/thousands of spreadsheets that include in the
VBA projects code like:

Application.ExecuteExcel4Macro "Solver.xla..."

This no longer works in Excel 2003. It does not produce an error, but
seems
to do nothing. The code is easy to rewrite by adding a reference to
solver.xla and calling the functions as normal in VBA. The problem is that
I
would have to replace the code in all the hundreds/thousands of scientific
spreadsheets that have already been created. I need to have a solid
credible
reason to tell my boss why I am going to need a lot more time to do my
part
of the migration, more than just something like "I think Microsoft have
stopped supporting the old macro language". I need to KNOW. And that was
just a guess anyway. Does anyone know why the above code does not work in
Excel 2003, while it is fine in Excel'97? Also, is there a update/patch
available from Microsoft to fix the problem? Basically, is there any way I
can avoid having to rewrite the code?

Thanks in advance,
Chris




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default solver.xla problems migrating from Excel'97 to 2003

hi jon,

I'm not at work so I cannot give you the exact code (I will cut &
paste it tomorrow) but these are the commands used:

Application.ExecuteExcel4Macro "Solver.xla!solverreset()"
Application.ExecuteExcel4Macro "Solver.xla!solverok(plot!R46C4, 2, 0,
plot!r13c12:r14c12)"
Application.ExecuteExcel4Marco "Solver.xla!solverOptions(....)"
Application.ExecuteExcel4Macro "Solver.xla!solverok(plot!R46C4, 2, 0,
plot!r13c12:r14c12)"
Application.ExecuteExcel4Macro "Solver.xla!solverSolve()"

Other than the parameters for the SolverOptions line that is it except
that it is all in Uppercase in the original. It does nothing. I have
had a debug stop or a msgbox between every line and it makes no
difference, nothing happens. It was originally written in Excel '97 on
Win2000 and I am trying to make it run in Excel 2003 (Office 2003 SP2)
on winXP SP2.

If I change the code to use the VBA form, .e.g.
SolverReset
SolverOK "$D$46", 2, 0, "$L$13L$L$14",
etc
and add the reference and install the addin then it works fine. The
trouble is that does not help with the hundreds of spreadsheets
already created with the XLM-style code in it.

Thanks,
Chris

On 26 Mar, 18:02, "Jon Peltier"
wrote:
List all of the solver commands you're using, not this abbreviated one.
There may be one or two lines omitted which cause your issues.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutionshttp://PeltierTech.com
_______

"Deborah Digby" wrote in message

...

hi,


at work, we are currently upgrading from Win200 to XP and from Excel '97
to
Excel 2003. We have hundreds/thousands of spreadsheets that include in the
VBA projects code like:


Application.ExecuteExcel4Macro "Solver.xla..."


This no longer works in Excel 2003. It does not produce an error, but
seems
to do nothing. The code is easy to rewrite by adding a reference to
solver.xla and calling the functions as normal in VBA. The problem is that
I
would have to replace the code in all the hundreds/thousands of scientific
spreadsheets that have already been created. I need to have a solid
credible
reason to tell my boss why I am going to need a lot more time to do my
part
of the migration, more than just something like "I think Microsoft have
stopped supporting the old macro language". I need to KNOW. And that was
just a guess anyway. Does anyone know why the above code does not work in
Excel 2003, while it is fine in Excel'97? Also, is there a update/patch
available from Microsoft to fix the problem? Basically, is there any way I
can avoid having to rewrite the code?


Thanks in advance,
Chris



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default solver.xla problems migrating from Excel'97 to 2003

SolverOk(plot!R46C4...

Just some thoughts...

This does not apply, but you may find it interesting.
http://support.microsoft.com/kb/213215

Usually, since Excel 97, you have to use A1 notation.
Make sure the worksheet "Plot" is the active sheet also.
If it's a complex model, make sure the workbook name does not have any
spaces in them.
--
HTH :)
Dana DeLouis
Windows XP & Office 2007


"ChrisDub" wrote in message
ps.com...
hi jon,

I'm not at work so I cannot give you the exact code (I will cut &
paste it tomorrow) but these are the commands used:

Application.ExecuteExcel4Macro "Solver.xla!solverreset()"
Application.ExecuteExcel4Macro "Solver.xla!solverok(plot!R46C4, 2, 0,
plot!r13c12:r14c12)"
Application.ExecuteExcel4Marco "Solver.xla!solverOptions(....)"
Application.ExecuteExcel4Macro "Solver.xla!solverok(plot!R46C4, 2, 0,
plot!r13c12:r14c12)"
Application.ExecuteExcel4Macro "Solver.xla!solverSolve()"

Other than the parameters for the SolverOptions line that is it except
that it is all in Uppercase in the original. It does nothing. I have
had a debug stop or a msgbox between every line and it makes no
difference, nothing happens. It was originally written in Excel '97 on
Win2000 and I am trying to make it run in Excel 2003 (Office 2003 SP2)
on winXP SP2.

If I change the code to use the VBA form, .e.g.
SolverReset
SolverOK "$D$46", 2, 0, "$L$13L$L$14",
etc
and add the reference and install the addin then it works fine. The
trouble is that does not help with the hundreds of spreadsheets
already created with the XLM-style code in it.

Thanks,
Chris

On 26 Mar, 18:02, "Jon Peltier"
wrote:
List all of the solver commands you're using, not this abbreviated one.
There may be one or two lines omitted which cause your issues.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutionshttp://PeltierTech.com
_______

"Deborah Digby" wrote in message

...

hi,


at work, we are currently upgrading from Win200 to XP and from Excel
'97
to
Excel 2003. We have hundreds/thousands of spreadsheets that include in
the
VBA projects code like:


Application.ExecuteExcel4Macro "Solver.xla..."


This no longer works in Excel 2003. It does not produce an error, but
seems
to do nothing. The code is easy to rewrite by adding a reference to
solver.xla and calling the functions as normal in VBA. The problem is
that
I
would have to replace the code in all the hundreds/thousands of
scientific
spreadsheets that have already been created. I need to have a solid
credible
reason to tell my boss why I am going to need a lot more time to do my
part
of the migration, more than just something like "I think Microsoft have
stopped supporting the old macro language". I need to KNOW. And that
was
just a guess anyway. Does anyone know why the above code does not work
in
Excel 2003, while it is fine in Excel'97? Also, is there a update/patch
available from Microsoft to fix the problem? Basically, is there any
way I
can avoid having to rewrite the code?


Thanks in advance,
Chris







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default solver.xla problems migrating from Excel'97 to 2003

Thanks Jim,

I meant that the new code works with a reference. The offending code just
does nothing, whether I put a reference to SOLVER in toolsRErefences.. or
not. Even if I install the addin in Toolsaddins it still does work.

"Jim Cone" wrote:

Deborah/Chris,
Since you have no help so far, I will stick my neck out here...

XL4 macros should work in XL2003. However, Microsoft is trying
to come up with some way to eliminate them in post XL12 versions
without making too many people mad.

You mention that the code works if you set a reference to the
Solver add-in. That sounds as if your code depends on the Solver
add-in being installed by the user. A new Installation of Excel
would certainly not load any add-ins.

I would think that an IT department should be able to create and run a
script that would load the Solver add-in on networked units using Excel.
Suggest you see what they have to say.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Deborah Digby"

wrote in message
hi,
at work, we are currently upgrading from Win200 to XP and from Excel '97 to
Excel 2003. We have hundreds/thousands of spreadsheets that include in the
VBA projects code like:

Application.ExecuteExcel4Macro "Solver.xla..."

This no longer works in Excel 2003. It does not produce an error, but seems
to do nothing. The code is easy to rewrite by adding a reference to
solver.xla and calling the functions as normal in VBA. The problem is that I
would have to replace the code in all the hundreds/thousands of scientific
spreadsheets that have already been created. I need to have a solid credible
reason to tell my boss why I am going to need a lot more time to do my part
of the migration, more than just something like "I think Microsoft have
stopped supporting the old macro language". I need to KNOW. And that was
just a guess anyway. Does anyone know why the above code does not work in
Excel 2003, while it is fine in Excel'97? Also, is there a update/patch
available from Microsoft to fix the problem? Basically, is there any way I
can avoid having to rewrite the code?

Thanks in advance,
Chris



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default solver.xla problems migrating from Excel'97 to 2003

thanks but that made no difference. anyway here is the original code:
s = Application.LibraryPath & "\solver\solver.XLA"
On Error Resume Next
Workbooks.Open filename:=s
Application.ExecuteExcel4Macro String:="SOLVER.XLA!SOLVER.RESET()"
Application.ExecuteExcel4Macro
String:="SOLVER.XLA!SOLVER.OK(PLOT!R46C4,2,0,(PLOT !R14C12:R17C12))"
Application.ExecuteExcel4Macro
String:="SOLVER.XLA!SOLVER.OPTIONS(100,100,0.00000 1,FALSE,FALSE,2,1,1,0.05,TRUE)"
' Application.ExecuteExcel4Macro
String:="SOLVER.XLA!SOLVER.ADD(!R15C12,2,""=R17C12 "")"
Application.ExecuteExcel4Macro
String:="SOLVER.XLA!SOLVER.OK(PLOT!R46C4,2,0,(PLOT !R14C12:R17C12))"
Application.ExecuteExcel4Macro String:="SOLVER.XLA!SOLVER.SOLVE()"

(the above lines all fit on a single line each - not needing a _ line
continuation character)

I am mystified. My hunch is that the XLM code has been withdrawn, as
suggested by people on other forums, but I want to know for sure why it does
not work. I know that in Win2000, when it sort of supported both the Win98
and WInNT API calls - you had a choice of which type to use, that some of the
Win98 ones were missing. Instead of getting an error message, again simply
nothing happened - making it very hard to debug. Maybe this is the case here.
In some ways it would be more helpful if the code fell over because the
functions did not exists anymore.

Chris

"Dana DeLouis" wrote:

SolverOk(plot!R46C4...


Just some thoughts...

This does not apply, but you may find it interesting.
http://support.microsoft.com/kb/213215

Usually, since Excel 97, you have to use A1 notation.
Make sure the worksheet "Plot" is the active sheet also.
If it's a complex model, make sure the workbook name does not have any
spaces in them.
--
HTH :)
Dana DeLouis
Windows XP & Office 2007


"ChrisDub" wrote in message
ps.com...
hi jon,

I'm not at work so I cannot give you the exact code (I will cut &
paste it tomorrow) but these are the commands used:

Application.ExecuteExcel4Macro "Solver.xla!solverreset()"
Application.ExecuteExcel4Macro "Solver.xla!solverok(plot!R46C4, 2, 0,
plot!r13c12:r14c12)"
Application.ExecuteExcel4Marco "Solver.xla!solverOptions(....)"
Application.ExecuteExcel4Macro "Solver.xla!solverok(plot!R46C4, 2, 0,
plot!r13c12:r14c12)"
Application.ExecuteExcel4Macro "Solver.xla!solverSolve()"

Other than the parameters for the SolverOptions line that is it except
that it is all in Uppercase in the original. It does nothing. I have
had a debug stop or a msgbox between every line and it makes no
difference, nothing happens. It was originally written in Excel '97 on
Win2000 and I am trying to make it run in Excel 2003 (Office 2003 SP2)
on winXP SP2.

If I change the code to use the VBA form, .e.g.
SolverReset
SolverOK "$D$46", 2, 0, "$L$13L$L$14",
etc
and add the reference and install the addin then it works fine. The
trouble is that does not help with the hundreds of spreadsheets
already created with the XLM-style code in it.

Thanks,
Chris

On 26 Mar, 18:02, "Jon Peltier"
wrote:
List all of the solver commands you're using, not this abbreviated one.
There may be one or two lines omitted which cause your issues.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutionshttp://PeltierTech.com
_______

"Deborah Digby" wrote in message

...

hi,

at work, we are currently upgrading from Win200 to XP and from Excel
'97
to
Excel 2003. We have hundreds/thousands of spreadsheets that include in
the
VBA projects code like:

Application.ExecuteExcel4Macro "Solver.xla..."

This no longer works in Excel 2003. It does not produce an error, but
seems
to do nothing. The code is easy to rewrite by adding a reference to
solver.xla and calling the functions as normal in VBA. The problem is
that
I
would have to replace the code in all the hundreds/thousands of
scientific
spreadsheets that have already been created. I need to have a solid
credible
reason to tell my boss why I am going to need a lot more time to do my
part
of the migration, more than just something like "I think Microsoft have
stopped supporting the old macro language". I need to KNOW. And that
was
just a guess anyway. Does anyone know why the above code does not work
in
Excel 2003, while it is fine in Excel'97? Also, is there a update/patch
available from Microsoft to fix the problem? Basically, is there any
way I
can avoid having to rewrite the code?

Thanks in advance,
Chris






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
Migrating Custom color palette from 2003 to 2007 Wenster Excel Discussion (Misc queries) 0 September 26th 08 02:33 PM
Won't Work with Excel'97 - What Will Q John[_110_] Excel Programming 2 September 28th 05 11:50 AM
Solver Problems Walker Excel Worksheet Functions 2 May 2nd 05 07:33 PM
Problems with solver and vba Marco[_7_] Excel Programming 2 July 30th 04 08:47 AM


All times are GMT +1. The time now is 06:08 PM.

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

About Us

"It's about Microsoft Excel"