Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Add_Row()
- Application.ScreenUpdating = False
- ActiveSheet.Unprotect
- With ActiveWorkbook.ActiveSheet
- If .FilterMode Then
- .ShowAllData
- End If
- End With
- Sheets("People to Project").Select
- ActiveSheet.Unprotect
- With ActiveWorkbook.ActiveSheet
- If .FilterMode Then
- .ShowAllData
- End If
- End With
- r0w = ActiveCell.Row
- c0l = ActiveCell.Column
- ThisWorkbook.Sheets("Overview").Cells(r0w, c0l).EntireRow.Insert
- ThisWorkbook.Sheets("People to Project").Cells(r0w, c0l).EntireRow.Insert
- Sheets("Overview").Select
- Range(Cells(r0w, 17), Cells(r0w, 48)).Select
- Selection.Style = "1. Projectfield"
- Sheets("People to Project").Select
- ActiveSheet.Unprotect
- Range(Cells(r0w, 12), Cells(r0w, 43)).Select
- Selection.Style = "1. Projectfield"
- ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
- False, AllowFormattingCells:=True, AllowFiltering:=True
- Sheets("Overview").Select
- ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
- False, AllowFormattingCells:=True, AllowFiltering:=True
- Application.ScreenUpdating = True
- End Sub
Add Comment
Please, Sign In to add comment