Hi there,
I'm in the need of some help. I open a text file and store it in a collection of array:
Then I'm going to make a bunch of changes to this collection but it just... doesn't do it. The code works fine, but the arrays are literally unchanged:
I tried it in the immediate debug window, and sure enough I can execute all sort of code without error but none of the data inside my collection is changed.
What the hell is this? :banghead:
Thank you
I'm in the need of some help. I open a text file and store it in a collection of array:
Code:
Open filepath For Input As #filenumber
While Not EOF(filenumber)
Line Input #filenumber, lineread
file.Add Split("" & SEP & lineread, SEP) 'index starts at 1 for simplicity
Wend
Close #filenumber
Then I'm going to make a bunch of changes to this collection but it just... doesn't do it. The code works fine, but the arrays are literally unchanged:
Code:
For i = 1 To UBound(file(1))
If file(1)(i) = "Sales Doc. Type" Then file(1)(i) = "Type"
If file(1)(i) = "Name 1" Then file(1)(i) = "List Name"
If file(1)(i) = "Main WorkCtr" Then file(1)(i) = "Mnwkctr"
Next i
I tried it in the immediate debug window, and sure enough I can execute all sort of code without error but none of the data inside my collection is changed.
Code:
: Item 1(0) : "" : String
: Item 1(1) : "Order" : String
: Item 1(2) : "Sales Doc. Type" : String
: Item 1(3) : "System Status" : String
: Item 1(4) : "User Status" : String
: Item 1(5) : "City" : String
: Item 1(6) : "Name 1" : String
: Item 1(7) : "Main WorkCtr" : String
: Item 1(8) : "Country" : String
What the hell is this? :banghead:
Thank you