Hello,
I created a macro that inserts a copy of the last row's format to make a new record (row). I would like to some how run the macro without a shortcut key.
Instead I would like to be at the last record (row) and once I start typing something on any cell in the next empty row it will create the new row, or run the macro.
I would like to link or integrate the following macro to the new vb code.
Note: If you have any suggestions on a better way to code the creation of a "New Record (ROW)" i would really appreciate it.
Thank You,
xluser26
I created a macro that inserts a copy of the last row's format to make a new record (row). I would like to some how run the macro without a shortcut key.
Instead I would like to be at the last record (row) and once I start typing something on any cell in the next empty row it will create the new row, or run the macro.
I would like to link or integrate the following macro to the new vb code.
Note: If you have any suggestions on a better way to code the creation of a "New Record (ROW)" i would really appreciate it.
Code:
Sub RelativeAddNewRow()
'
' RelativeAddNewRow Macro
'
' Keyboard Shortcut: Ctrl+Shift+R
'
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.End(xlToRight).Select
Selection.End(xlUp).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlDown).Select
Selection.End(xlDown).Select
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Copy
ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.Select
End Sub
Thank You,
xluser26