Solved

Saving to a disk

Posted on 2001-09-18
4
128 Views
Last Modified: 2010-05-02
I need to know how to open and save information to a disk in the A: Drive? Please send sample code to Xci@Swirve.com Thank you for your help.


Stevan Thompson
0
Comment
Question by:Xci
4 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
try code like this:

dim iFile sa Long

iFile = Freefile

open "A:/MyFile.txt" for output as #Ifile

Print #ifile,MyText

close #iFile

you can also use the statement Write#

look up the Open Statement in the VB Help system, for examples (you may need to look at the "See Also" choices shown in the Help system.
0
 
LVL 18

Accepted Solution

by:
Crash2100 earned 55 total points
Comment Utility
what kind of data?  just text?  structured data?
0
 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
Arthur_Wood is right, but the "A:/..." should be a backslash in Windows: "A:\..."

By the way, EE does not encourage code being sent directly to its users because then there is no database entry for future viewers.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
for Xci,
it would be nice to answer to Crash2100.
Cheers
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now