Solved

Saving to a disk

Posted on 2001-09-18
4
130 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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA saving file message display 5 64
Windows Script Host failed (Access is denied.) error 6 146
How does CurrentUser work? 10 37
How to make an ADE file by code? 11 83
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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…

770 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