?
Solved

Newbie Q - File saving.

Posted on 1999-07-12
2
Medium Priority
?
132 Views
Last Modified: 2010-05-02
Ok,  I'm very new to VB, and I have  a simple question:  How do you save the contects of a textbox (which is in turn assigned to a variable) to disk?  I understand how to assign variables, open the common dialog and all that, but I don't seem to understand how to simply write the contents of a text box to disk!  Strangely, neither of the "learning edition" books I got with VB 6 explains this, aside from how to open the common dialog for loading and saving.

In essence, what I'm trying to do is have a screen of textboxes that the user fills out, and can then save as a sort of "preferences" file, so that they can simply reload them next time without having to enter it all in again.

If anyone could explain this, or give me a reference to where to look for an answer, I'd appreciate it.

Thanks!

Dana

0
Comment
Question by:mcneil
[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
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
caraf_g earned 100 total points
ID: 1523826
Dim intFile As Integer
intFile = FreeFile

'Clear out previous data
Open strFile For Output As #intFile
Close #intFile

'...

'Write big string
intFile = FreeFile
Open strFile For Binary As #intFile

'Note the two commas!
Put #intFile,,Text1.Text

Close #intFile

0
 
LVL 10

Expert Comment

by:caraf_g
ID: 1523827
mcneil,

Please reject this answer and ask Customer Service to delete this question. First of all you posted the question twice, but also I think that the direction the duplicate thread is taking is altogether more promising to get you a solution...
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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

718 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