Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replacing XLS file rather than saving
I'm working on a little bit VBA that, one by one, opens hundreds o existing xls files, compares the sheet names then adds some sheets o new data as needed. It then re-saves (replaces) the original file wit the one that has the new sheets of data. The problem that I desparatel need help with, is that every time it goes to save the file, Excel pop up a box asking me if I want to replace the existing file (which clearl I do). However, this needs to be an automated process so I can't si there for 3 hours clicking yes to each of the hundreds of files. Doe anybody know how I can get VBA/Excel to replace the file without bein prompted each time?? (by the way, the SaveChanges does not help suc as: Workbooks("BOOK1.XLS").Close SaveChanges:=True does not help). Thanks HEAPS for any suggestions or help!! FuzzyDov -- FuzzyDov ----------------------------------------------------------------------- FuzzyDove's Profile: http://www.excelforum.com/member.php...fo&userid=1667 View this thread: http://www.excelforum.com/showthread.php?threadid=31889 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replacing XLS file rather than saving
Try turning off alerts. E.g.,
Application.DisplayAlerts = False ' your code here Application.DisplayAlerts = True -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "FuzzyDove" wrote in message ... I'm working on a little bit VBA that, one by one, opens hundreds of existing xls files, compares the sheet names then adds some sheets of new data as needed. It then re-saves (replaces) the original file with the one that has the new sheets of data. The problem that I desparately need help with, is that every time it goes to save the file, Excel pops up a box asking me if I want to replace the existing file (which clearly I do). However, this needs to be an automated process so I can't sit there for 3 hours clicking yes to each of the hundreds of files. Does anybody know how I can get VBA/Excel to replace the file without being prompted each time?? (by the way, the SaveChanges does not help such as: Workbooks("BOOK1.XLS").Close SaveChanges:=True does not help). Thanks HEAPS for any suggestions or help!! FuzzyDove -- FuzzyDove ------------------------------------------------------------------------ FuzzyDove's Profile: http://www.excelforum.com/member.php...o&userid=16676 View this thread: http://www.excelforum.com/showthread...hreadid=318894 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replacing XLS file rather than saving
application.displayalerts=False 'do the save/overwrite application.displayalerts=True -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam FuzzyDove wrote : I'm working on a little bit VBA that, one by one, opens hundreds of existing xls files, compares the sheet names then adds some sheets of new data as needed. It then re-saves (replaces) the original file with the one that has the new sheets of data. The problem that I desparately need help with, is that every time it goes to save the file, Excel pops up a box asking me if I want to replace the existing file (which clearly I do). However, this needs to be an automated process so I can't sit there for 3 hours clicking yes to each of the hundreds of files. Does anybody know how I can get VBA/Excel to replace the file without being prompted each time?? (by the way, the SaveChanges does not help such as: Workbooks("BOOK1.XLS").Close SaveChanges:=True does not help). Thanks HEAPS for any suggestions or help!! FuzzyDove |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replacing XLS file rather than saving
Try rapping...
Application.DisplayAlerts = False 'turn warnings off and Application.DisplayAlerts = True 'turn warnings on around the code that replaces the file. HTH, Gary Brown "FuzzyDove" wrote: I'm working on a little bit VBA that, one by one, opens hundreds of existing xls files, compares the sheet names then adds some sheets of new data as needed. It then re-saves (replaces) the original file with the one that has the new sheets of data. The problem that I desparately need help with, is that every time it goes to save the file, Excel pops up a box asking me if I want to replace the existing file (which clearly I do). However, this needs to be an automated process so I can't sit there for 3 hours clicking yes to each of the hundreds of files. Does anybody know how I can get VBA/Excel to replace the file without being prompted each time?? (by the way, the SaveChanges does not help such as: Workbooks("BOOK1.XLS").Close SaveChanges:=True does not help). Thanks HEAPS for any suggestions or help!! FuzzyDove -- FuzzyDove ------------------------------------------------------------------------ FuzzyDove's Profile: http://www.excelforum.com/member.php...o&userid=16676 View this thread: http://www.excelforum.com/showthread...hreadid=318894 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Replacing a password protected file. | Excel Discussion (Misc queries) | |||
What cause the file size increase by replacing $L with $U? | Excel Discussion (Misc queries) | |||
Replacing all references to a file, with a new file name. Lots!! | Excel Worksheet Functions | |||
replacing contents of a cell with data froma list/file | Excel Worksheet Functions | |||
Hexadecimal File Replacing excel file | Excel Discussion (Misc queries) |