Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,113
- Office Version
- 365
- Platform
- Windows
Good Day All,
I'm trying to create a sub that adds the data upon the username with its date and time onto a sheets cell.
However, I do not want it to shift the entire row to move down when the sub has been run more than once.
For example, Before run:
After run:
Where I'd like theoretically all other columns data and rows to not be moved when the sub is run and only for it to insert and move data down for Column A.
Please let me know, if you have any suggestions.
Thank you!
pinaceous
I'm trying to create a sub that adds the data upon the username with its date and time onto a sheets cell.
VBA Code:
Sub InsertUserName()
Application.Goto Worksheets(2).Range("A1"), True
Range("A1").EntireRow.Insert
ActiveCell.Value = Environ("username") & " - " & Now()
End Sub
However, I do not want it to shift the entire row to move down when the sub has been run more than once.
For example, Before run:
After run:
Where I'd like theoretically all other columns data and rows to not be moved when the sub is run and only for it to insert and move data down for Column A.
Please let me know, if you have any suggestions.
Thank you!
pinaceous