Hi all,
I seem 2 B having a little problem.
I use Open --- for append as #1 as I dont want to lose any info already in the file.
However, It always puts a blank line between each entry. Is there any way to prevent this?
thanx
Printable View
Hi all,
I seem 2 B having a little problem.
I use Open --- for append as #1 as I dont want to lose any info already in the file.
However, It always puts a blank line between each entry. Is there any way to prevent this?
thanx
Let's see your code and a small few lines of the file
before and after.
Private Sub mnuFaveAdd_Click()
Open App.Path & "\fave.txt" For Append As #2
Print #2, brwWebBrowser.LocationURL
Close #2
End Sub
Hi...
When writing to a file, use the Print # statement.
But:
At the end of the expretion use ";" or "," like this:
Open filename For Append As #1
Print #1, "Hello";
Print #1, "World"
Close #1
This will create a string of "HelloWorld" in the file.
(with a /cr after the string "World" because of the
lack of ";")
Bye Bye...
It mush have something to do with the browser control's version of returning the item to you. With text files that would not and does not leave a line.
Try putting it in a string first and then removing blank spaces
Ie.
myString = brwWebBrowser.LocationURL
myString = Trim(myString)
Print #2, myString