Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

Saving to a disk

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
Xci
Asked:
Xci
1 Solution
 
Arthur_WoodCommented:
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
 
Crash2100Commented:
what kind of data?  just text?  structured data?
0
 
rspahitzCommented:
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
 
Richie_SimonettiCommented:
for Xci,
it would be nice to answer to Crash2100.
Cheers
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now