ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   FYI Excel 2007: Saving a xlsm file with a hidden worksheet activated makes worksheet visible (https://www.excelbanter.com/excel-programming/431962-fyi-excel-2007-saving-xlsm-file-hidden-worksheet-activated-makes-worksheet-visible.html)

David G.[_3_]

FYI Excel 2007: Saving a xlsm file with a hidden worksheet activated makes worksheet visible
 
I have an Excel application that copies data from one file into hidden
worksheets in 2 other files. When I updated to Excel 2007, one of the
hidden worksheets kept appearing after I ran the data copy procedure
and reopened the target file.

The only difference between this reappearing worksheet and the other 9
hidden sheets was the fact that the code left the reappearing
worksheet active. (I set Excel's screenupdating=false while opening
the target files, moving all the data, and then closing/saving the
target files.) In 2003, Excel would not change the worksheet's visible
property, even though the worksheet had been activated while
screenupdating was set to "false".

I added one line of code, which set one of the visible worksheets
active before saving the file. Once again the hidden sheets remain
hidden, all of them.

Hope this is informative.
THANKS!
David G.


All times are GMT +1. The time now is 07:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com