Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code to instruct "Insert new disk"
Jim Jackson wrote: I have searched VBA Help and this forum but cannot find any hint to what I need. I have written a routine that backs up selected file types to the drive chosen by the user. I found that, when including jpeg files, the CD fills up rather quickly. The macro hung up and I was forced to re-boot to regain control. Is there code that will recognize that the next file is too large for the available space and allow a change of disks? Thanks. -- Best wishes, Jim An interesting problem. I've never tried automating saving to multiple disks, but perhaps you could work around the problem by first knowing the capacity of the drive/disk, then, explicitly save each file one at a time, but whilst detecting their respective sizes (search for info on using the FileSystem object for this). As soon as you encounter a file that exceeds the remaing capacity of the disk, you can enter a DoEvents loop after prompting the user to swap the disks, then continue from the file you left off at once the disk is changed. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code to instruct "Insert new disk"
You are right on the button. Using AvailableSpace I can write the lines
needed to trigger the msgbox and allow changing discs. Thanks, -- Pops Jackson "JakeyC" wrote: Jim Jackson wrote: I have searched VBA Help and this forum but cannot find any hint to what I need. I have written a routine that backs up selected file types to the drive chosen by the user. I found that, when including jpeg files, the CD fills up rather quickly. The macro hung up and I was forced to re-boot to regain control. Is there code that will recognize that the next file is too large for the available space and allow a change of disks? Thanks. -- Best wishes, Jim An interesting problem. I've never tried automating saving to multiple disks, but perhaps you could work around the problem by first knowing the capacity of the drive/disk, then, explicitly save each file one at a time, but whilst detecting their respective sizes (search for info on using the FileSystem object for this). As soon as you encounter a file that exceeds the remaing capacity of the disk, you can enter a DoEvents loop after prompting the user to swap the disks, then continue from the file you left off at once the disk is changed. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I get a "Disk full" message,what disk? | New Users to Excel | |||
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F | Excel Discussion (Misc queries) | |||
"Disk is Full" add-on question to "Can't reset last cell" post tod | Excel Discussion (Misc queries) | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) | |||
Insert code into each worksheet's "Sub Worksheet_SelectionChange" Function | Excel Programming |