ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to copy hidden sheet to front of tabs? (https://www.excelbanter.com/excel-programming/343341-macro-copy-hidden-sheet-front-tabs.html)

StargateFan[_3_]

Macro to copy hidden sheet to front of tabs?
 
I've often thought this would be handy. If there was a macro that
would make a copy of the hidden main sheet, users would be much, much
less likely to somehow overwrite the blank main sheet. Can this be
done, though?


Tom Ogilvy

Macro to copy hidden sheet to front of tabs?
 
If the sheet is hidden rather than very hidden, you can copy it:

Worksheets("Main").Copy After:=Worksheets(Worksheets.Count)


If it is very hidden you might try

Appliction.ScreenUpdating = False
Worksheets("Main").Visible = xlSheetVisible
worksheets("Main").copy After:=Worksheets(Worksheets.count)
Worksheets("Main").Visible = xlSheetVeryHidden
Application.ScreenUpdating = True

--
Regards,
Tom Ogilvy


"StargateFan" wrote in message
...
I've often thought this would be handy. If there was a macro that
would make a copy of the hidden main sheet, users would be much, much
less likely to somehow overwrite the blank main sheet. Can this be
done, though?





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

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