Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Make a text file with Visual Basic

Posted on 1999-07-23
6
Medium Priority
?
209 Views
Last Modified: 2013-11-25
How can I build a text file with Visual Basic Code?
0
Comment
Question by:abautistat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Author Comment

by:abautistat
ID: 1526899
Edited text of question.
0
 
LVL 3

Expert Comment

by:jbil
ID: 1526900
Open "myfile.txt" For Output As #2
  strFILE = 'what ever you want
Print #2, strFILE
   Close #2
0
 
LVL 6

Accepted Solution

by:
simonbennett earned 400 total points
ID: 1526901
Dim lngFile as long
dim A as integer

lngFile = FreeFile
open "c:\mytext.txt" for output as #lngFile
for a = 1 to 20
    Print #lngFile, "Text line Number " & trim(str(A))
next a
Close #lngFile

HTH - Good Luck
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Comment

by:abautistat
ID: 1526902
Thank you simonbennet
Thank you jbil

You are fantastic.
0
 

Author Comment

by:abautistat
ID: 1526903
Thank you simonbennet
Thank you jbil

You are fantastic.
0
 

Expert Comment

by:bvn99
ID: 1526904
you can use File System Objects
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question