compile error

E

emilija

Hi,


I have the macro named SOLVER, when I call this macro with the sub routine
MIX, the Compile error occurred with massage "Expect variable or procedure,
not project"



Both macros are given below,

What can be possible mistake,






Sub SOLVER()
Dim StoppedFeederColor As Long
Dim RunningFeederColor As Long
StoppedFeederColor = RGB(150, 150, 150)
RunningFeederColor = RGB(0, 0, 0)
With ThisWorkbook.Worksheets("5 Comp Mix")
Display_off

.Select
SolverOk SetCell:="$t$37", MaxMinVal:=2, ValueOf:="0",
ByChange:="$k$63:$k$67"
solverSolve UserFinish = False
SolverFinish


End With
ThisWorkbook.Worksheets("MainBackground").Select
Display_on


With ThisWorkbook.DialogSheets("MainDlg")
For i = 1 To 5
For j = 1 To 5
If ThisWorkbook.Worksheets("5 Comp Mix").Range("TonsFeed") _
.Cells(i).Value < AlmostZero
Then
.TextBoxes((i - 1) * 5 + j).Font.Color =
StoppedFeederColor
Else
.TextBoxes((i - 1) * 5 + j).Font.Color =
RunningFeederColor
End If
Next j
Next i
End With

End Sub

***********************************

Sub Mix()
Update_Sum_Values
Shift_Proportions
Call SOLVER


End Sub
 
R

Rob Bovey

Hi Emilija

Solver is the name of the VBProject for the Solver add-in, which you are
using in your project. Therefore you can't also have a macro named solver.
Rename your macro to something else, like MySolver.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top