Few more question on this VB stuff. I have this code working and dong exactly what I want in VB software:
Dim sFileText As String
Dim iFileNo As Integer
Dim myvar As String
Dim place As String
Private Sub Command1_Click()
iFileNo = FreeFile
myvar = InputBox("Enter place")
place = "c:\" + myvar + ".txt"
Open place For Output As #iFileNo
End Sub
Private Sub Command2_Click()
xd00d = 123
yd00d = 123
Print #iFileNo, "X= ", xd00d
Print #iFileNo, "Y= ", yd00d
End Sub
Private Sub Command3_Click()
Close #iFileNo
End Sub
When you click the first button a window comes up to type in File name. Then the second button saves "123" in a vertical column as many times as you click it. The last button Closes the file.
Now I moved this code to Mach the first button and the last button work fine but the button to save the coordinates from GetOEMDro (800) and (801) instead of the the "123" value does not work.
I think it's because the Open command is a private deal. How do I make the second button work?
What I did was made one button and put this code in it:
Dim sFileText As String
Dim iFileNo As Integer
Dim myvar As String
Dim place As String
iFileNo = FreeFile
myvar = InputBox("Enter place")
place = "c:\" + myvar + ".txt"
Open place For Output As #iFileNo
For the second button this part of the code:
xd00d = getoemdro (800)
yd00d = getoemdro (801)
Print #iFileNo, "X= ", xd00d
Print #iFileNo, "Y= ", yd00d
Last button:
Close #iFileNo