Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Walk me through this VBA piece please
Hi everyone,
I have this piece of VBA code: For JobNr = 1 To 25 result = vehicleModel.ReadModel("MCS2vehicle.mpl") If result 0 Then MsgBox vehicleModel.ErrorMessage Else vehicleModel.Solve If JobNr < 1 Then myVal = Range("M10").Value With Workbooks(filename).Worksheets("ParetoFrontier") Set myObjRng = .Range("M10", .Cells(.Rows.Count, "M").End(xlUp)) If Application.CountIf(myObjRng, myVal) 0 Then GoTo NextJobNr End If End With End If Write solution Next It supposed to allow only NEW (same one to be excluded) solutions to be written down. The 1st solution is in "M10" So everytime a solution is found, it has to compare it with previous ones in colmun M, if new it will write it down otherwise JobNr will turn to next. What is wrong in it please? Thanks alot, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Walk over all the points in a series and extract the X value? | Charts and Charting in Excel | |||
J-Walk Enhanced Data Form | Excel Discussion (Misc queries) | |||
Editing a column chart for Variance Walk negative numbers | Charts and Charting in Excel | |||
Two hyperlinks in 1 piece of text? | Excel Discussion (Misc queries) | |||
What is wrong with this vba piece of code? | Excel Discussion (Misc queries) |