Hellyworld
New Member
- Joined
- May 3, 2017
- Messages
- 6
Hi,
I need your help with a code that will add a new row at the bottom of the table. The code is working but i need to add on this new row in "H" column the Application.UserName and on "F" column the Date.
This is my code until now:
For more details please do not hesitate to contact me!
Best regards,
Hellyworld
I need your help with a code that will add a new row at the bottom of the table. The code is working but i need to add on this new row in "H" column the Application.UserName and on "F" column the Date.
This is my code until now:
Code:
Sub Insert_New_Rows() Dim Lr As Integer
Lr = Range("B" & Rows.Count).End(xlUp).Row 'Searching last row in column B
Rows(Lr + 1).Insert Shift:=xlDown 'Inserting new row
Cells(Lr + 1, "B") = Cells(Lr, "B") + 1 'Adding a sequential number
Rows(Lr).Copy 'Copying format of last row
Rows(Lr + 1).PasteSpecial Paste:=xlPasteFormats 'Pasting format to new row
Application.CutCopyMode = False 'Deactivating copy mode
End Sub
For more details please do not hesitate to contact me!
Best regards,
Hellyworld