![]() |
Data being saved in error (?)
Hi all...
I am running a pretty long series of reports. The data is refreshed daily via iSeries data file transfers, and is then brought into several different reports/spreadsheets. However, I just noticed, that one data file keeps getting overwritten - how I am not sure since there is no command to save the file any where in my code. The chunk of code that is causing the proplem rearranges some columns then filters the data file based on one column, copies the range of information and pastes it to the report file. Fairly simple I thought... until I noticed the data filed saved with the rearranged columns and filtered on the last criteria used. To close the file, I used: Application.CutCopyMode = False Windows("data.xls").Activate ActiveWorkbook.Close SaveChanges = False Would an autofilter cause the file to save on its own? I need this data to save back to the original format so I can use it in other reports. |
Data being saved in error (?)
ActiveWorkbook.Close SaveChanges = False
should be ActiveWorkbook.Close SaveChanges:=False -- Regards, Tom Ogilvy "NewBike" wrote: Hi all... I am running a pretty long series of reports. The data is refreshed daily via iSeries data file transfers, and is then brought into several different reports/spreadsheets. However, I just noticed, that one data file keeps getting overwritten - how I am not sure since there is no command to save the file any where in my code. The chunk of code that is causing the proplem rearranges some columns then filters the data file based on one column, copies the range of information and pastes it to the report file. Fairly simple I thought... until I noticed the data filed saved with the rearranged columns and filtered on the last criteria used. To close the file, I used: Application.CutCopyMode = False Windows("data.xls").Activate ActiveWorkbook.Close SaveChanges = False Would an autofilter cause the file to save on its own? I need this data to save back to the original format so I can use it in other reports. |
All times are GMT +1. The time now is 03:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com