Solved

Saving to a disk

Posted on 2001-09-18
4
129 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
ID: 6491332
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
ID: 6491337
what kind of data?  just text?  structured data?
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6491551
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
ID: 6491818
for Xci,
it would be nice to answer to Crash2100.
Cheers
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

863 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

19 Experts available now in Live!

Get 1:1 Help Now