How it crashed? Excel crashed? Runtime error? Please press debug, so you can post the codeblock. where TCE halts.
I get 5 out of 6 of the loading blocks light up then a MVB run time error 9 subscript out of range
on debug the TCE.XLSM Trade Code page is displayed with the following
Sub POS_Systems()
Dim Station_ID As Long, ArDiscount As Variant, A As Long, b As Long, c As Long, lLZeile As Long, ArMinPrice(1 To 10000) As Long
Worksheets("Pre_Select").Range("J2:J1001").ClearContents
For A = 1 To AzRegStations
ReDim ArDiscount(AzGoods)
DoEvents
'SystemÍD schreiben
Station_ID = Ar_DBRegStations(A, 1)
For c = 3 To AzGoods + 2
DoEvents
If ArData_Buy(c, Station_ID + 2) <> 0 And ArData_Buy(c, Station_ID + 1) <> "" Then (this bit highlighted yellow)
ArDiscount(c - 2) = ArData_Buy(c, Station_ID + 2) - ArData_Goods(c - 2, 3)
End If
Next c
ArMinPrice(A) = WorksheetFunction.Min(ArDiscount)
Erase ArDiscount
Next A
With Application.WorksheetFunction
Worksheets("Pre_Select").Range("J2:J" & AzRegStations + 1) = .Transpose(ArMinPrice)
End With
Worksheets("Systems").Activate
Worksheets("Systems").Range("A2:K1001").ClearContents
Worksheets("Systems").Range("A2:K" & AzRegStations + 1).Value = Worksheets("Pre_Select").Range("A2:K" & AzRegStations + 1).Value
ActiveWorkbook.Worksheets("Systems").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Systems").Sort.SortFields.Add Key:=Range( _
"J2:J10001"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Systems").Sort
.SetRange Range("A1:K10001")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
anything I can do to fix or delete all and restart?
thx for your precious time appreciate it
Enty