Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NULL character ?

Status
Not open for further replies.

tb2007

Programmer
Apr 2, 2005
33
YU
I need to make txt file with NULL character, for some kind of testing in VB app. How to do this?
 
From within the VB program, you can do this:


Code:
         dim FileNumber as integer

         ' Open a file and send it a null character.
         ' Then close the file
         FileNumber = FreeFile
         On Error Resume Next
         Open "C:\Temp\Null.txt" For Binary As FileNumber
         Print #FileNumber, vbNull
         Close FileNumber
         On Error GoTo 0

Hope this helps.


HyperEngineer
If it ain't broke, it probably needs improvement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top