|
-
FreeFile
Group:
I have been trying to learn some of the commands and methods of VB and one
shown was FreeFile which I understand gets the next available file number
to store data.
The following is part of suggested code to play with, but won't execute
because it has a bad file name or number.
Does that mean that the File Name which is a concatenation of a literal
"Test" and Index number were not "Dim"med or perhaps the file number
should havew been a pathway?
Would appreciate any suggestions or comments
David
Private Sub Main()
For MyIndex = 1 To 5 ' Loop 5 times
FileNumber = FreeFile(0) ' Get unused file numbers
Open "Test" & MyIndex For Output _
As #FileNumber
Write #FileNumber, "This is a Sample"
Close #FileNumber
Next MyIndex
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks