princemuchao
Programmer
Okay, what I'm trying to do is use the filelistbox as an item that is always open in a text editor program I am creating... all text files are in the same dir as the program, so I have only a filelistbox.
The problem I am having is when someone adds a new file, I can't get the focus to change to that new text file. I assume that the way to do it would be to get the ListIndex by using the string, but I can't get it to work.
My first clumsy attempt illustrated below might illustrate what I'm trying to do a little better:
Dim strpath As String
Dim n As Integer
strpath = InputBox$("Enter new file name:"
File1.List = (strpath & ".x"
Open (strpath & ".x" For Random As #1
Close #1
File1.Refresh
File1.ListIndex
Any help would be greatly appreciated...
PMC
The problem I am having is when someone adds a new file, I can't get the focus to change to that new text file. I assume that the way to do it would be to get the ListIndex by using the string, but I can't get it to work.
My first clumsy attempt illustrated below might illustrate what I'm trying to do a little better:
Dim strpath As String
Dim n As Integer
strpath = InputBox$("Enter new file name:"
File1.List = (strpath & ".x"
Open (strpath & ".x" For Random As #1
Close #1
File1.Refresh
File1.ListIndex
Any help would be greatly appreciated...
PMC