Reputation: 4359
I'm working with some old VB6 code and it's still new to me. I know that in VB6 you assign an integer to represent a file. I have a program that uses quite a few files and it's tough to tell what file it's working with when it will only display the number when I mouse over the variable. (pic below).
So in the example above, how do i know what file #5 is?
Thanks
Upvotes: 6
Views: 326
Reputation: 30398
Upvotes: 3
Reputation: 39354
You might have to modify the program to 'register' filenames with their file numbers:
Dim FileRegister as Collection
Dim FileName as String
Dim FileNumber as Integer
...
FileRegister.add FileName, str(FileNumber)
Open FileName For Output as #FileNumber
...
FileRegister.Remove str(FileNumber)
Close #FileNumber
Upvotes: 3