# Off Topic > Hello..Introduce yourself >  >  Introduction and Excel VBA Solver - 2010

## chillepepper101

Evening all,

Great to be a part of your forum! I will have a read through and see just what things I can learn, I hope as my skills improve I maybe able to help someone else!

Im currently studying an Msc Business Analysis and Consulting and enjoying the skills im picking up, even if excel is a bit hard at times!  Im dashing around squeezing my work into the evenings and weekends while being a Army Officer in the day.  Good to be learning all the time though.

I am into Golf, Mountaineering and running and swimming and come from Southampton.

Paul

----------


## arlu1201

Hello chillepepper101, 

Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.

----------


## chillepepper101

The problem I am trying to solve!  Any help is much appreciated.

I am trying to make a VBA button to run solver in Excel 2010.  I have managed all the solver and am happy with this and tried using the record button simply to activate that work but unfortunatley I cant get it to work.  I have tried to attach the spreadsheet here but dont think I can unfortunately.

Is there anyone who may now how to make this run please.  Its just a solver to optimise the U Stat (cell N6) by adjusting the figures in Alpha (cell Q2), Beta (Q3), and Gamma (Q4) between 0 and 1.

Any help or advise is much appreciated.  I copy the macro recorded below in case for some people its sho obvious what I have missed!

Sub VBASolverUSTAT()
'
' VBASolverUSTAT Macro
'

'
    SolverOk SetCell:="$N$6", MaxMinVal:=2, ValueOf:=0, ByChange:="$Q$2:$Q$4", _
        Engine:=3, EngineDesc:="Evolutionary"
    SolverSolve
End Sub


Best regards,

Paul

----------


## chillepepper101

Thanks Arlu!  Just spotted your message after I posted my question!

----------


## chillepepper101

Arlu,

Am I right thinking you can't attach anything?  Is this to protect people from viruses etc?

Paul

----------


## Alf

> Am I right thinking you can't attach anything?



The paperclip icon you see when you click on the "Go Advanced" button don't work. Futher down on the page you see a button marked "Manage Attachment" click on than one instead and you should be able to upload file(s).

To run Solver using a macro you need to set a reference to tools in VBA. Select "Developers" tab, click "Visual Basic" icon. In the new windows that opends Click "Tools" -> "Referenses" and tick box marked "Solver"

Alf

----------


## chillepepper101

Thanks guys, because of the time pressure I went commercial on it and a guy has solved it.  Exactly like you said.  I will try and give more lead in next time as clearly 3 clicks might not have been worth $30!

Regards

Paul

----------


## Alf

> as clearly 3 clicks might not have been worth $30!



I don't think you pay for 3 clicks, you pay for the know-how where to put them. :Wink: 

Alf

----------

