Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default 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
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
Walk over all the points in a series and extract the X value? Chrisso Charts and Charting in Excel 3 August 28th 09 12:20 PM
J-Walk Enhanced Data Form Leanne Excel Discussion (Misc queries) 9 April 24th 08 11:15 PM
Editing a column chart for Variance Walk negative numbers sauza311 Charts and Charting in Excel 3 January 16th 08 07:19 PM
Two hyperlinks in 1 piece of text? It Is Me Here Excel Discussion (Misc queries) 3 December 22nd 07 06:01 PM
What is wrong with this vba piece of code? Jo[_2_] Excel Discussion (Misc queries) 4 October 4th 07 05:01 PM


All times are GMT +1. The time now is 09:46 AM.

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"