Abandoned [RELEASE] Trade Computer Extension

Status
Thread Closed: Not open for further replies.
Stop ***ing around here and better tell me how I can use this tool without having Excel! HOW could you ever make such a tool in excel.... are you stakeholder at microsoft? (no disrespect to your work, which is brilliant. probably... cos I can't try for myself)
 
Last edited:
error 9

Just got error 9 again with the new versions and only one station and one system added normally through the interface.

Sub DES_Systems()

Dim Station_ID_S As Long, Station_ID_Z As Long, ArProfit As Variant, b As Long, c As Long, lLZeile As Long, a As Long, Y As Long, ArMaxPrice(1 To 10000) As Long
Dim ArStations As Variant, ArCopy As Variant, x As Long

Call Add_DES_Stations
Worksheets("Pre_Select").Range("Y2:Y1001").ClearContents
'Systemname schreiben
Station_ID_S = Worksheets("Werte").Cells(3, 2).Value
For Y = 1 To Worksheets("Werte").Cells(79, 8).Value
DoEvents
ReDim ArProfit(AzGoods)
Station_ID_Z = Worksheets("Pre_Select").Cells(1 + Y, 18).Value
For c = 3 To AzGoods + 2
DoEvents
If ArData_Buy(c, Station_ID_S + 2) <> 0 And ArData_Buy(c, Station_ID_S + 2) <> "" And ArData_Sell(c, Station_ID_Z + 2) <> 0 And ArData_Sell(c, Station_ID_Z + 2) <> "" And ArData_Sell(c, Station_ID_Z + 2) - ArData_Buy(c, Station_ID_S + 2) > 0 Then
ArProfit(c - 2) = ArData_Sell(c, Station_ID_Z + 2) - ArData_Buy(c, Station_ID_S + 2)
End If
Next c
ArMaxPrice(Y) = WorksheetFunction.Max(ArProfit)
Erase ArProfit
Next Y
With Application.WorksheetFunction
Worksheets("Pre_Select").Range("Y2:Y" & Worksheets("Werte").Cells(40, 2).Value + 1) = .Transpose(ArMaxPrice)
End With
Worksheets("Systems").Activate
Worksheets("Systems").Range("L2:V20001").ClearContents
Worksheets("Systems").Range("L2:V" & Worksheets("Werte").Cells(40, 2).Value + 1).Value = Worksheets("Pre_Select").Range("P2:Z" & Worksheets("Werte").Cells(40, 2).Value + 1).Value
Call Add_DES_Stations_UR
ActiveWorkbook.Worksheets("Systems").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Systems").Sort.SortFields.Add Key:=Range( _
"U2:U20001"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Systems").Sort
.SetRange Range("L1:V20001")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
If Worksheets("DB_Config").Cells(2, 14).Value = True Then
If Worksheets("Systems").Cells(2, 12).Value <> "" Then
For a = 1 To AzRegStations - 1
If (Ar_Type(Ar_DBRegStations(Worksheets("Systems").Cells(1 + a, 14).Value, 10), 3) = "L" And Worksheets("Data").Cells(111, 2).Value = True) Or (Ar_Type(Ar_DBRegStations(Worksheets("Systems").Cells(1 + a, 14).Value, 10), 3) = "M" And Worksheets("Data").Cells(110, 2).Value = True = True) Or (Ar_Type(Ar_DBRegStations(Worksheets("Systems").Cells(1 + a, 14).Value, 10), 3) = "S" And Worksheets("Data").Cells(109, 2).Value = True) Then
Worksheets("Werte").Cells(12, 2).Value = Worksheets("Systems").Cells(a + 1, 12).Value
Worksheets("Werte").Cells(13, 2).Value = Worksheets("Systems").Cells(a + 1, 14).Value
a = AzRegStations - 1
End If
Next a
Worksheets("DB_Config").Cells(2, 5).Value = Worksheets("Werte").Cells(12, 2).Value
Worksheets("DB_Config").Cells(2, 6).Value = Worksheets("Werte").Cells(13, 2).Value
Call Check_Size
If Main_Panel = "TOP" Then
Panel_Menu_top.DES_Label.Caption = "AUTO DESTINATION"
Panel_Menu_top.DES_Info.Caption = Worksheets("Werte").Cells(14, 2).Value & " : " & Worksheets("Werte").Cells(15, 2).Value
Panel_Menu_top.DES_Juris.Caption = Worksheets("Werte").Cells(16, 2).Value & " SPACE"
Panel_Menu_top.DES_Eco.Caption = Worksheets("Werte").Cells(17, 2).Value
If Worksheets("Werte").Cells(14, 2).Value = Worksheets("ShipLog").Cells(Worksheets("Werte").Cells(74, 3).Value + 1, 2).Value Then
Panel_Menu_top.DES_Distance.Caption = Worksheets("Werte").Cells(18, 5).Text & " LS"
Else
Panel_Menu_top.DES_Distance.Caption = Worksheets("Werte").Cells(16, 5).Value & " LY"
End If
Else
Panel_Menu_bottom.DES_Label.Caption = "AUTO DESTINATION"
Panel_Menu_bottom.DES_Info.Caption = Worksheets("Werte").Cells(14, 2).Value & " : " & Worksheets("Werte").Cells(15, 2).Value
Panel_Menu_bottom.DES_Juris.Caption = Worksheets("Werte").Cells(16, 2).Value & " SPACE"
Panel_Menu_bottom.DES_Eco.Caption = Worksheets("Werte").Cells(17, 2).Value
If Worksheets("Werte").Cells(14, 2).Value = Worksheets("ShipLog").Cells(Worksheets("Werte").Cells(74, 3).Value + 1, 2).Value Then
Panel_Menu_bottom.DES_Distance.Caption = Worksheets("Werte").Cells(18, 5).Text & " LS"
Else
Panel_Menu_bottom.DES_Distance.Caption = Worksheets("Werte").Cells(16, 5).Value & " LY"
End If
End If
Panel_Trade.CB_Route.ListIndex = Worksheets("Werte").Cells(53, 5).Value - 1
Panel_Trade.DES_Label.Caption = "RECOMMENDED STATION"
Else
Worksheets("DB_Config").Cells(2, 14).Value = False
Call save_TCE_ini
If Main_Panel = "TOP" Then
Panel_Menu_top.DES_Label.Caption = "SELECTED DESTINATION"
Else
Panel_Menu_bottom.DES_Label.Caption = "SELECTED DESTINATION"
End If
Panel_Trade.CB_Route.ListIndex = Worksheets("Werte").Cells(53, 5).Value - 1
Panel_Trade.DES_Label.Caption = "SELECTED STATION"
End If
End If


End Sub
 
Did you saw at the Import Windows any adds of Trade Stations (like Trade Station: +x)?

Yes - it said
"Old Database Content - Star Systems 22411 Trade Stations 99 Price Data 8019"
Then I ticked all of the stations named in the box
Then clicked Start Import
"Star Systems +32 Trade Stations +33"
When I clicked OK on the "Import Success - exiting TCE form, I got an "Error Line: 0 Error: (0)" message

Then if I open the Cartography panel, there are no systems in jump range.

Do you want me to send you the mdb that I am importing ?
 
Stop ***ing around here and better tell me how I can use this tool without having Excel! HOW could you ever make such a tool in excel.... are you stakeholder at microsoft? (no disrespect to your work, which is brilliant. probably... cos I can't try for myself)

I thought I knew Excel pretty good and I know a bit of visual basic, but I never thought they could be used together in this way !
I completely agree, It is brilliantly impressive work !
 
Yes - it said
"Old Database Content - Star Systems 22411 Trade Stations 99 Price Data 8019"
Then I ticked all of the stations named in the box
Then clicked Start Import
"Star Systems +32 Trade Stations +33"
When I clicked OK on the "Import Success - exiting TCE form, I got an "Error Line: 0 Error: (0)" message

Then if I open the Cartography panel, there are no systems in jump range.

Do you want me to send you the mdb that I am importing ?

Yes, please upload it. I check it then.

- - - - - Additional Content Posted / Auto Merge - - - - -

Just got error 9 again with the new versions and only one station and one system added normally through the interface.

Sub DES_Systems()

Dim Station_ID_S As Long, Station_ID_Z As Long, ArProfit As Variant, b As Long, c As Long, lLZeile As Long, a As Long, Y As Long, ArMaxPrice(1 To 10000) As Long
Dim ArStations As Variant, ArCopy As Variant, x As Long

Call Add_DES_Stations
Worksheets("Pre_Select").Range("Y2:Y1001").ClearContents
'Systemname schreiben
Station_ID_S = Worksheets("Werte").Cells(3, 2).Value
For Y = 1 To Worksheets("Werte").Cells(79, 8).Value
DoEvents
ReDim ArProfit(AzGoods)
Station_ID_Z = Worksheets("Pre_Select").Cells(1 + Y, 18).Value
For c = 3 To AzGoods + 2
DoEvents
If ArData_Buy(c, Station_ID_S + 2) <> 0 And ArData_Buy(c, Station_ID_S + 2) <> "" And ArData_Sell(c, Station_ID_Z + 2) <> 0 And ArData_Sell(c, Station_ID_Z + 2) <> "" And ArData_Sell(c, Station_ID_Z + 2) - ArData_Buy(c, Station_ID_S + 2) > 0 Then
ArProfit(c - 2) = ArData_Sell(c, Station_ID_Z + 2) - ArData_Buy(c, Station_ID_S + 2)
End If
Next c
ArMaxPrice(Y) = WorksheetFunction.Max(ArProfit)
Erase ArProfit
Next Y
With Application.WorksheetFunction
Worksheets("Pre_Select").Range("Y2:Y" & Worksheets("Werte").Cells(40, 2).Value + 1) = .Transpose(ArMaxPrice)
End With
Worksheets("Systems").Activate
Worksheets("Systems").Range("L2:V20001").ClearContents
Worksheets("Systems").Range("L2:V" & Worksheets("Werte").Cells(40, 2).Value + 1).Value = Worksheets("Pre_Select").Range("P2:Z" & Worksheets("Werte").Cells(40, 2).Value + 1).Value
Call Add_DES_Stations_UR
ActiveWorkbook.Worksheets("Systems").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Systems").Sort.SortFields.Add Key:=Range( _
"U2:U20001"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Systems").Sort
.SetRange Range("L1:V20001")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
If Worksheets("DB_Config").Cells(2, 14).Value = True Then
If Worksheets("Systems").Cells(2, 12).Value <> "" Then
For a = 1 To AzRegStations - 1
If (Ar_Type(Ar_DBRegStations(Worksheets("Systems").Cells(1 + a, 14).Value, 10), 3) = "L" And Worksheets("Data").Cells(111, 2).Value = True) Or (Ar_Type(Ar_DBRegStations(Worksheets("Systems").Cells(1 + a, 14).Value, 10), 3) = "M" And Worksheets("Data").Cells(110, 2).Value = True = True) Or (Ar_Type(Ar_DBRegStations(Worksheets("Systems").Cells(1 + a, 14).Value, 10), 3) = "S" And Worksheets("Data").Cells(109, 2).Value = True) Then
Worksheets("Werte").Cells(12, 2).Value = Worksheets("Systems").Cells(a + 1, 12).Value
Worksheets("Werte").Cells(13, 2).Value = Worksheets("Systems").Cells(a + 1, 14).Value
a = AzRegStations - 1
End If
Next a
Worksheets("DB_Config").Cells(2, 5).Value = Worksheets("Werte").Cells(12, 2).Value
Worksheets("DB_Config").Cells(2, 6).Value = Worksheets("Werte").Cells(13, 2).Value
Call Check_Size
If Main_Panel = "TOP" Then
Panel_Menu_top.DES_Label.Caption = "AUTO DESTINATION"
Panel_Menu_top.DES_Info.Caption = Worksheets("Werte").Cells(14, 2).Value & " : " & Worksheets("Werte").Cells(15, 2).Value
Panel_Menu_top.DES_Juris.Caption = Worksheets("Werte").Cells(16, 2).Value & " SPACE"
Panel_Menu_top.DES_Eco.Caption = Worksheets("Werte").Cells(17, 2).Value
If Worksheets("Werte").Cells(14, 2).Value = Worksheets("ShipLog").Cells(Worksheets("Werte").Cells(74, 3).Value + 1, 2).Value Then
Panel_Menu_top.DES_Distance.Caption = Worksheets("Werte").Cells(18, 5).Text & " LS"
Else
Panel_Menu_top.DES_Distance.Caption = Worksheets("Werte").Cells(16, 5).Value & " LY"
End If
Else
Panel_Menu_bottom.DES_Label.Caption = "AUTO DESTINATION"
Panel_Menu_bottom.DES_Info.Caption = Worksheets("Werte").Cells(14, 2).Value & " : " & Worksheets("Werte").Cells(15, 2).Value
Panel_Menu_bottom.DES_Juris.Caption = Worksheets("Werte").Cells(16, 2).Value & " SPACE"
Panel_Menu_bottom.DES_Eco.Caption = Worksheets("Werte").Cells(17, 2).Value
If Worksheets("Werte").Cells(14, 2).Value = Worksheets("ShipLog").Cells(Worksheets("Werte").Cells(74, 3).Value + 1, 2).Value Then
Panel_Menu_bottom.DES_Distance.Caption = Worksheets("Werte").Cells(18, 5).Text & " LS"
Else
Panel_Menu_bottom.DES_Distance.Caption = Worksheets("Werte").Cells(16, 5).Value & " LY"
End If
End If
Panel_Trade.CB_Route.ListIndex = Worksheets("Werte").Cells(53, 5).Value - 1
Panel_Trade.DES_Label.Caption = "RECOMMENDED STATION"
Else
Worksheets("DB_Config").Cells(2, 14).Value = False
Call save_TCE_ini
If Main_Panel = "TOP" Then
Panel_Menu_top.DES_Label.Caption = "SELECTED DESTINATION"
Else
Panel_Menu_bottom.DES_Label.Caption = "SELECTED DESTINATION"
End If
Panel_Trade.CB_Route.ListIndex = Worksheets("Werte").Cells(53, 5).Value - 1
Panel_Trade.DES_Label.Caption = "SELECTED STATION"
End If
End If


End Sub

Found the error finally. Update come soon!
 
Can you tell me where to upload it to please ?

- - - - - Additional Content Posted / Auto Merge - - - - -

Can you access this ....
https://www.dropbox.com/sh/xbbi2mgk59ztqrn/AACexmw2Q1MB9Xkf7vZlFBiVa?dl=0
 
Just got error 9 again with the new versions and only one station and one system added normally through the interface.

Sub DES_Systems()

Dim Station_ID_S As Long, Station_ID_Z As Long, ArProfit As Variant, b As Long, c As Long, lLZeile As Long, a As Long, Y As Long, ArMaxPrice(1 To 10000) As Long
Dim ArStations As Variant, ArCopy As Variant, x As Long

Call Add_DES_Stations
Worksheets("Pre_Select").Range("Y2:Y1001").ClearContents
'Systemname schreiben
Station_ID_S = Worksheets("Werte").Cells(3, 2).Value
For Y = 1 To Worksheets("Werte").Cells(79, 8).Value
DoEvents
ReDim ArProfit(AzGoods)
Station_ID_Z = Worksheets("Pre_Select").Cells(1 + Y, 18).Value
For c = 3 To AzGoods + 2
DoEvents
If ArData_Buy(c, Station_ID_S + 2) <> 0 And ArData_Buy(c, Station_ID_S + 2) <> "" And ArData_Sell(c, Station_ID_Z + 2) <> 0 And ArData_Sell(c, Station_ID_Z + 2) <> "" And ArData_Sell(c, Station_ID_Z + 2) - ArData_Buy(c, Station_ID_S + 2) > 0 Then
ArProfit(c - 2) = ArData_Sell(c, Station_ID_Z + 2) - ArData_Buy(c, Station_ID_S + 2)
End If
Next c
ArMaxPrice(Y) = WorksheetFunction.Max(ArProfit)
Erase ArProfit
Next Y
With Application.WorksheetFunction
Worksheets("Pre_Select").Range("Y2:Y" & Worksheets("Werte").Cells(40, 2).Value + 1) = .Transpose(ArMaxPrice)
End With
Worksheets("Systems").Activate
Worksheets("Systems").Range("L2:V20001").ClearContents
Worksheets("Systems").Range("L2:V" & Worksheets("Werte").Cells(40, 2).Value + 1).Value = Worksheets("Pre_Select").Range("P2:Z" & Worksheets("Werte").Cells(40, 2).Value + 1).Value
Call Add_DES_Stations_UR
ActiveWorkbook.Worksheets("Systems").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Systems").Sort.SortFields.Add Key:=Range( _
"U2:U20001"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Systems").Sort
.SetRange Range("L1:V20001")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
If Worksheets("DB_Config").Cells(2, 14).Value = True Then
If Worksheets("Systems").Cells(2, 12).Value <> "" Then
For a = 1 To AzRegStations - 1
If (Ar_Type(Ar_DBRegStations(Worksheets("Systems").Cells(1 + a, 14).Value, 10), 3) = "L" And Worksheets("Data").Cells(111, 2).Value = True) Or (Ar_Type(Ar_DBRegStations(Worksheets("Systems").Cells(1 + a, 14).Value, 10), 3) = "M" And Worksheets("Data").Cells(110, 2).Value = True = True) Or (Ar_Type(Ar_DBRegStations(Worksheets("Systems").Cells(1 + a, 14).Value, 10), 3) = "S" And Worksheets("Data").Cells(109, 2).Value = True) Then
Worksheets("Werte").Cells(12, 2).Value = Worksheets("Systems").Cells(a + 1, 12).Value
Worksheets("Werte").Cells(13, 2).Value = Worksheets("Systems").Cells(a + 1, 14).Value
a = AzRegStations - 1
End If
Next a
Worksheets("DB_Config").Cells(2, 5).Value = Worksheets("Werte").Cells(12, 2).Value
Worksheets("DB_Config").Cells(2, 6).Value = Worksheets("Werte").Cells(13, 2).Value
Call Check_Size
If Main_Panel = "TOP" Then
Panel_Menu_top.DES_Label.Caption = "AUTO DESTINATION"
Panel_Menu_top.DES_Info.Caption = Worksheets("Werte").Cells(14, 2).Value & " : " & Worksheets("Werte").Cells(15, 2).Value
Panel_Menu_top.DES_Juris.Caption = Worksheets("Werte").Cells(16, 2).Value & " SPACE"
Panel_Menu_top.DES_Eco.Caption = Worksheets("Werte").Cells(17, 2).Value
If Worksheets("Werte").Cells(14, 2).Value = Worksheets("ShipLog").Cells(Worksheets("Werte").Cells(74, 3).Value + 1, 2).Value Then
Panel_Menu_top.DES_Distance.Caption = Worksheets("Werte").Cells(18, 5).Text & " LS"
Else
Panel_Menu_top.DES_Distance.Caption = Worksheets("Werte").Cells(16, 5).Value & " LY"
End If
Else
Panel_Menu_bottom.DES_Label.Caption = "AUTO DESTINATION"
Panel_Menu_bottom.DES_Info.Caption = Worksheets("Werte").Cells(14, 2).Value & " : " & Worksheets("Werte").Cells(15, 2).Value
Panel_Menu_bottom.DES_Juris.Caption = Worksheets("Werte").Cells(16, 2).Value & " SPACE"
Panel_Menu_bottom.DES_Eco.Caption = Worksheets("Werte").Cells(17, 2).Value
If Worksheets("Werte").Cells(14, 2).Value = Worksheets("ShipLog").Cells(Worksheets("Werte").Cells(74, 3).Value + 1, 2).Value Then
Panel_Menu_bottom.DES_Distance.Caption = Worksheets("Werte").Cells(18, 5).Text & " LS"
Else
Panel_Menu_bottom.DES_Distance.Caption = Worksheets("Werte").Cells(16, 5).Value & " LY"
End If
End If
Panel_Trade.CB_Route.ListIndex = Worksheets("Werte").Cells(53, 5).Value - 1
Panel_Trade.DES_Label.Caption = "RECOMMENDED STATION"
Else
Worksheets("DB_Config").Cells(2, 14).Value = False
Call save_TCE_ini
If Main_Panel = "TOP" Then
Panel_Menu_top.DES_Label.Caption = "SELECTED DESTINATION"
Else
Panel_Menu_bottom.DES_Label.Caption = "SELECTED DESTINATION"
End If
Panel_Trade.CB_Route.ListIndex = Worksheets("Werte").Cells(53, 5).Value - 1
Panel_Trade.DES_Label.Caption = "SELECTED STATION"
End If
End If


End Sub


Been wanting to try the files you sent me but I'm getting this error 9 everytime I start TCE :(

I have 3 hrs left to sleep. I'll try again tomorrow if I survive the day lol, Good night !
 
Been wanting to try the files you sent me but I'm getting this error 9 everytime I start TCE :(

I have 3 hrs left to sleep. I'll try again tomorrow if I survive the day lol, Good night !

Update (V1.37c) released:
- Bugfix for Error 9 issue
- Import routine slightly modified
 
Last edited:
Hi - sorry - it's me again.
I downloaded the version of the database that you sent the link for.
Then I cleared all TCE off my computer and installed from fresh.
Updated to 1.37c.
I now get an error on startup with a clean database ...... run time error "9" Subscript out of range
 
This time, when I try to import station data, I can select only one station from the list, and that's it.

Selecting method is changed, click and hold to select all stations, Control + Click to unselected.

Update (V1.37d) released:
- Removed error routine, till fixed.
 
Last edited:
Selecting method is changed, click and hold to select all stations, Control + Click to unselected.

Update (V1.37d) released:
- Removed error routine, till fixed.
Okay, it works to select, but after the process is ending, and it exits TCE, I get error line:0 Error: (0).

But once I restart, it seems to work. It loads the station info correctly it seems. I will report if I see anything wrong, ofc.

Thank you!
 
Last edited:
Okay, it works to select, but after the process is ending, and it exits TCE, I get error line:0 Error: (0).

But once I restart, it seems to work. It loads the station info correctly it seems. I will report if I see anything wrong, ofc.

Thank you!

Ignore the error, got fixed in next update tomorrow.
 
Last edited:
Me.BTN_Save.Caption Error

There seems to be an error in the Me.BTN_Save.Caption function.

Intermittently when I attempt to Save a Commodity record, the Debug mode will display the breakpoint below. (see image)

I am able to close TCE.xlsm (No Save) and re-open it okay. The only data loss is whatever record failed to save.

TCE - Commodity Save Error - Me.BTN_Save.Caption.png
 
Sorry if I am just being dense here, but I have installed the app and it all seems to load fine. The problem I am having is that the system I am in isn't on the list, but when I click on database (or any of the other buttons except options), it changes to 'LOCKED'. Has anyone seen this and knows how I can fix it? I don't get any errors when the app loads, so not sure if this is some issue with local rights to access the file?
 
Last edited:
Status
Thread Closed: Not open for further replies.
Back
Top Bottom