I have 2 main questions .
1) Assuming that i want to read the context from a:\text.txt , if the floppy is not inserted or the floppy cannot be read , it'll popup a runtime error . how can i display a msgbox instead of a runtime error msgbox ? i tried to use On Error Goto , but it will still popup the "please insert floppy" even though the floppy is in the drive , why ?
Dim fso As New FileSystemObject
Dim txtStream As TextStream
Dim strContent As String
Private Sub Form_Load()
On Error GoTo errhandler
Set txtStream = fso.OpenTextFile("a:\verify.txt", ForReading)
strContent = txtStream.ReadAll
MsgBox "please insert floppy"
Question 2 :
a string "831030"
how can i extract to str1 =83 , str2=10 and str3=30 .
if i got a listbox contain the months (January , Feb , March ,...December) ,how to correspond the str2 to the listbox ? ie : if str2=2 then the listbox will automatically select February and so on..