Almost everything is ready, but speed. I have 3 radio buttons. The user sets the desired speed using them. What I want to do is to remember the choice using the file "conf". Here's the code -
I want it to be 100% foolproof. If the user deleted the value from the file, a fatal error would occur and kill the program because the file exist, so it tries to read the value and fails. A problem. I'd use Try Catch, but it's VB5. I've heard something about on error goto, but I can't understand how it works. Basically I need to check if the first line of the file is "50", "70" or "100", and if it is read it. If not, Write "70" to the file's first line. Can someone please explain me how?
If Dir("conf") <> "" Then
Open "conf" For Input As #1
Line Input #1, str
Set FSO = CreateObject("Scripting.FileSystemObject")
Set newFIle = FSO.CreateTextFile("conf", True, False)
Thanks a lot to anyone who helps.