1. The answer is NO. #1 is the file number so if i am having 2 files it will be more easyer to open them with diferent file numbers.
If you want to save more then one line in a file just use:
Print #1, Text1.Text
Print #1, Text2.text
Let say that text1.text = "first line" and...
Sorry for not making me to understandable.
Let's try something more understandable and simple.
Create a new form, put 2 CommandButtons (named Command1 and Command2)and 2 text boxes on the form (named Text1 and Text2).
Put the next code into Command1_Click():
Open "c:\file.dat"...
You can try this and it schould not open Winoldap.
Dim From As String
Dim To As String
From = "c:\file.txt"
To = "lpt1"
FileCopy From, To
You could also use shell to copy the file to lpt1 also.
If you want to close an external file through code you should find an API...
Try using Command line arguments throw command$
It is only an ideea, i do not know if it will worck for more that one function.
---------------------------------------------------------
Hope it will help.
I realy think that there is a more quickly modality to do what you want.
To open a file for Output use something like this:
Open "c:\file.dat" For Output As #1 Len = 32767
Print #1, Text1.Text
Print #1, Form1.BackColor
Close 1
To open a file for Appending use...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.