programmingsite : code , tutorials and scripts
Navigation

home


ASP
ASP.net
C
C++
C#
PHP
Java
JavaScript
Powershell
VB.net

Visual Basic


Resources
code
tutorials
training

Ads
Products

 

 

Create a file





Create a file , 2 methods described below

Example 1

Private Sub Form_Load()

Dim objFSO As New FileSystemObject
Dim objFile As Object
Dim varString As Variant
varString = Array("some", "sample", "text")
Set objFSO = CreateObject("Scripting.FileSystemobject")
Set objFile = objFSO.CreateTextFile("f:\Test2.txt")
objFile.WriteLine varString(0) & " " & varString(1) & " " & varString(2)
objFile.Close

End Sub



Example 2

Creates a file called test1.txt and writes some text into it.

Private Sub Form_Load()

Open "f:\Test1.txt" For Output As #1
Write #1, "This is some sample text"
Write #1, "Programmershelp.co.uk"
Close #1

End Sub





Products
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals
Asp Studio 2005
Xtra PHP
Online PHP Script Encoder
Comparison

Links
Make money selling software
Uk shopping
UK price comparison
US price comparison
free articles
free stuff
Gambling resources
Software directory
XBox cheats and more
Sexy free wallpapers
Hosting resources
Nintendo Wii info
Beginners PHP
Health and fitness
Domain names
Dating site
Nintendo DS resources
Dropshippers
Maxi directory
Perfume and fragrances
PC shopping, tips and info
Magazine superstore

Ads