I have a spread sheet that I have to add a new row of information randomly. I have created a Macro to make this easier for me and to make sure all my other tabs update correctly as well. There is only one thing that I do not understand why it keeps happening. One cell, the same cell every time I use said Macro, changes the name to the one above it. I do not see any eye catching issues with my macro. Below is the
Sub InsertLine()
'Nameing Items
Dim Password As String
Password = "NEXTELECTRIC"
Dim RowInsert As String
Row_Insert = "A:L"
Dim FillDown As String
Fill_Down = "B:D"
Dim M As String
M = "Main"
Dim W As String
W = "Workings"
Dim FillDown_Range As String
FillDown_Range = "B5:I5"
Dim Message As String
Message = "Press Shift+Ctrl+P After Done Editing"
Dim Message_Name As String
Message_Name = "Protect Reminder"
'UnProtect Sheet
ActiveSheet.Unprotect (Password)
'InsertRow
ActiveCell.Columns(Row_Insert).Insert Shift:=xlShiftDown
ActiveCell.Columns(Fill_Down).FillDown
'Update "Main" Sheet
Worksheets(M).Unprotect (Password)
Range(FillDown_Range).FillDown
Worksheets(M).Protect (Password)
'Bring Back to ActiveCell
Worksheets(W).Select
'Message Box Reminder To Protect
MsgBox Message, vbOKOnly, Message_Name
End Sub
Sub InsertLine()
'Nameing Items
Dim Password As String
Password = "NEXTELECTRIC"
Dim RowInsert As String
Row_Insert = "A:L"
Dim FillDown As String
Fill_Down = "B:D"
Dim M As String
M = "Main"
Dim W As String
W = "Workings"
Dim FillDown_Range As String
FillDown_Range = "B5:I5"
Dim Message As String
Message = "Press Shift+Ctrl+P After Done Editing"
Dim Message_Name As String
Message_Name = "Protect Reminder"
'UnProtect Sheet
ActiveSheet.Unprotect (Password)
'InsertRow
ActiveCell.Columns(Row_Insert).Insert Shift:=xlShiftDown
ActiveCell.Columns(Fill_Down).FillDown
'Update "Main" Sheet
Worksheets(M).Unprotect (Password)
Range(FillDown_Range).FillDown
Worksheets(M).Protect (Password)
'Bring Back to ActiveCell
Worksheets(W).Select
'Message Box Reminder To Protect
MsgBox Message, vbOKOnly, Message_Name
End Sub