Solved

Saving to a disk

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

729 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