Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Problems

Hi All!

I have a backup sub that saves workbook data to a floppy disc. How ca
i delete all data (emtpy the whole disc) that's already on the flopp
before saving the new one?

In one worksheet data is saved from columns ("A:E") and the date whe
it was saved is i column ("F"). Every monday i printout all data tha
was saved the week before. I want create a printout userform with t
ComboBoxes that allows me to print from the date i select, ex:
Print from "2004-02-16" (ComboBox1) to "2004-02-20" (ComboBox2).
I know how to create the UserForm and how to set the ListFillRange fo
the ComboBoxes, but how can i use the selection of the ComboBoxes t
set the printout range?

Cheers

/Stromm

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default VBA Problems

Let's see you sub. Hope you are not saving to the floppy. You should save to
HD and COPY to the floppy.
Have a look at vba HELP indes for KILL to kill the files first
HTH

Sub CopyToFloppy()
Application.DisplayAlerts = False
IsFloppyReady ' Macro below
Dim fso As Object
myfile = ActiveWorkbook.Name
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "c:\yourfolder\" & myfile, "a:\"
Application.DisplayAlerts = True
End Sub

Sub IsFloppyReady()
Dim drv As String
Dim s As String
Dim fso
s = "Drive A has no Floppy..." & vbLf & _
"Please insert a floppy in the 'A' Drive"
Set fso = CreateObject("Scripting.FileSystemObject")
With fso
drv = .GetDriveName("A:\")
'// Is Drive Ready? (No Floppy in A:)?
If Not .getdrive(drv).IsReady Then
MsgBox s
End If
End With
End Sub



--
Don Guillett
SalesAid Software

"Stromma " wrote in message
...
Hi All!

I have a backup sub that saves workbook data to a floppy disc. How can
i delete all data (emtpy the whole disc) that's already on the floppy
before saving the new one?

In one worksheet data is saved from columns ("A:E") and the date when
it was saved is i column ("F"). Every monday i printout all data that
was saved the week before. I want create a printout userform with to
ComboBoxes that allows me to print from the date i select, ex:
Print from "2004-02-16" (ComboBox1) to "2004-02-20" (ComboBox2).
I know how to create the UserForm and how to set the ListFillRange for
the ComboBoxes, but how can i use the selection of the ComboBoxes to
set the printout range?

Cheers

/Stromma


---
Message posted from
http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
PROBLEMS PROBLEMS!! HENRIETA Excel Discussion (Misc queries) 0 August 11th 08 07:46 PM
Sum problems [email protected] Excel Worksheet Functions 4 January 5th 07 04:01 PM
Two Problems Aoife Excel Discussion (Misc queries) 2 April 10th 06 02:44 AM
XLA problems Neil Bhandar[_2_] Excel Programming 1 January 15th 04 04:53 AM


All times are GMT +1. The time now is 01:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"