Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Save row heights with VB copy
I have a scheduling sheet that gets copied at the end of each week and
pasted into a new sheet. (code below). The problem is that I have several hidden rows that become visible when the sheet is pasted. How do I copy the original exactly. Private Sub btnFinal_Click() Application.ScreenUpdating = False ActiveSheet.Unprotect 'Finalize Schedule Sheets.Add After:=Sheets(Sheets.Count) ActiveSheet.Name = "Week " & Sheets("New Schedule").Range("a2") Sheets("New Schedule").Select Cells.Select Selection.Copy Dim Shname As String With Sheets("New Schedule") Shname = "Week " & Sheets("New Schedule").Range("a2") End With On Error Resume Next Sheets(Shname).Select On Error GoTo 0 ActiveSheet.Paste Application.CutCopyMode = False Range("a:s").Select ActiveWindow.Zoom Sheets("New Schedule").Select Range("Week").Select Selection.ClearContents Range("a:s").Select ActiveWindow.Zoom = True Range("a2").Select Range("a2") = Range("a2") + 1 Range("b3") = Range("b3") + 7 ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to copy row heights from one sheet to another in Excell | Excel Discussion (Misc queries) | |||
how to copy row heights from one sheet to another in Excell | Excel Discussion (Misc queries) | |||
Excel: copy grid, widths & heights down page: heights wrong! why? | Excel Discussion (Misc queries) | |||
copy formats column width & row heights between Excel WORKSHEETS? | Excel Discussion (Misc queries) | |||
How to save a file without overwrite or save a copy? | Setting up and Configuration of Excel |