View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default Using Solver with Excel 2007 VBA

Bandicoot

Simply check the version

If Application.Version <12
'Do stuff for 2003 and before
End if

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog: www.nickhodge.co.uk/blog/

FREE UK OFFICE USER GROUP MEETING, MS READING, 27th APRIL 2007
www.officeusergroup.co.uk

"Bandicoot" wrote in message
...
It seems that Solver code such as Application.Run "solver.xla!solverreset"
has to be changed to Application.Run "solver.xlam!solverreset"
when using Excel 2007, even in "compatability mode".
With the 'xlam' file extension, will this code still work in Excel 2003
and
if not, is there any way to write a VBA project using solver that will
work
in both Excel 2003 and Excel 2007?