View Full Version : Solved: Send data to a floppy disk.

12-04-2004, 02:11 PM
I have an Excel system that calls up various information from vlookups etc, prints out order sheets, saves the workbook in case any changes have been made and copies some of the data (date, quantity,description) to another sheet as a log. It all works very well but I would like to add another function to it.

Is it possible to make it copy a file stored elsewhere on the computer to a floppy disk?
sort of - if this file exists, alert the user to insert a floppy disk, press OK to continue, then copy the file to the floppy and continue with the printout and save operations as normal.


Zack Barresse
12-04-2004, 03:21 PM
Hello again outrider, :hi:

Maybe you could use something like this ...

Option Explicit

Sub savetodisk()
Application.DisplayAlerts = False
Dim floppy As String, myFilePath As String, currPath As String, currFile As String
floppy = "A:\"
myFilePath = "C:\Documents and Settings\Zack\My Documents\"
currPath = "C:\Documents and Settings\Zack\Desktop\"
currFile = ThisWorkbook.Name
If MsgBox("Please insert a disk into drive " & floppy & "." & vbCrLf & _
"Press OK to continue, Cancel to quit.", vbOKCancel + vbInformation, _
"Insert Floppy") = vbCancel Then Exit Sub
On Error Resume Next 'if cancel is pressed for overwrite during next line of code.
ThisWorkbook.SaveAs myFilePath & currFile
ThisWorkbook.SaveAs currPath & currFile
Application.DisplayAlerts = True
End Sub

Not sure of your exact specifics. Does this help/come close?

12-05-2004, 11:28 AM
My system reads a hidden worksheet and if a particular cell has a "Yes" in it, then it would copy the required file out of one of 25 folders (machine setting data for temperatures, injection pressures, clamping force etc) and put it onto a floppy disk so that it is produced with the order sheet at the same time.

Thanks for your help.

12-06-2004, 06:04 AM

FileCopy "path to file\filename", "a:\filename"


12-06-2004, 06:31 AM

Thanks, simple and it worked.