Hallo VBAler,
Habe heute von meinem Lehrer diesen VBA Code bekommen und ich soll mal versuche ihn in ein C Sharp Windows Forms Programm umzusetzen.
Leider weiß ich aber nicht was hier gemacht wird..
Also hier ist der Code:
richtig = True
Range("B3").Select
ew = ActiveCell.FormulaR1C1
For i = 0 To ew - 3
'cells(Zeile,Spalte)
For j = i + 1 To ew - 2
m1 = Cells(i + 2, 6).Value
m2 = Cells(j + 2, 6).Value
If m1 = m2 Then richtig = False
Next j
Next i
Range("A7").Select
If richtig Then
ActiveCell.FormulaR1C1 = "Primitivzahl"
Else
ActiveCell.FormulaR1C1 = "keine Primitivzahl"
End If
Bitte meldet euch schnell
MfG Scarpall
|