With the below code why does the file contents like fine in the explorer (date) only but show a large number when viewed the code way ?
Sub Globals
'Declare the global variables here.
regdt=Date(Now)
End Sub
Sub App_Start
Form1.Show
reg
End Sub
Sub reg
ErrorLabel(Err1)
If FileExist ("c:\windows\colorbn.txt") = true Then
FileOpen (c1,"c:\windows\colorbn.txt",cRead)
r = FileRead (c1)
Do Until r = EOF
sum = sum + r
r = FileRead (c1)
Loop
textbox1.Text=sum
FileClose (c1)
Else
regdt=Date(Now)
FileOpen (c1,"c:\windows\colorbn.txt",cWrite)
FileWrite (c1,regdt)
FileClose (c1)
End If
Goto sbed
err1:
Msgbox("Error")
sbed:
End Sub
Sub Globals
'Declare the global variables here.
regdt=Date(Now)
End Sub
Sub App_Start
Form1.Show
reg
End Sub
Sub reg
ErrorLabel(Err1)
If FileExist ("c:\windows\colorbn.txt") = true Then
FileOpen (c1,"c:\windows\colorbn.txt",cRead)
r = FileRead (c1)
Do Until r = EOF
sum = sum + r
r = FileRead (c1)
Loop
textbox1.Text=sum
FileClose (c1)
Else
regdt=Date(Now)
FileOpen (c1,"c:\windows\colorbn.txt",cWrite)
FileWrite (c1,regdt)
FileClose (c1)
End If
Goto sbed
err1:
Msgbox("Error")
sbed:
End Sub