View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Copy to a flash drive

hi
i use 2003 also. here is the code i use to save to my flash drive. the code
lists my flash drive as G. your's may be different.
saving to the flash drive takes a while almost like saving to the old time
floppy disks. don't know why. it's faster to transfer the file vis explorer
but that is rather manual.
Sub FlashSave()
Application.DisplayAlerts = False
Application.StatusBar = "Saving to Flash"
ChDir "G:\Excel"

ActiveWorkbook.SaveAs Filename:="G:\Excel\Expences2008.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", _

ReadOnlyRecommended:=False ,_
CreateBackup:=False

Application.StatusBar = "saving to c drive"

ChDir "C:\Documents and Settings\FSt1\My Documents\XL"

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\FSt1\My Documents\XL\Expences2008.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:= False, CreateBackup:=False

Application.DisplayAlerts = True
Application.StatusBar = False
MsgBox "Finished Saving."
End Sub

regards
FSt1


"ypukpete" wrote:

i am using Excel 2003. I am looking for VBA code which I can use with a
command button which will open the Copy-to Window so that I can copy the
workbook I have open to a Flash Drive in a USB port. All help gratefully
accepted
Thanks.
--
ypukpete