CJG19
New Member
- Joined
- Jul 12, 2021
- Messages
- 40
- Office Version
- 2010
- Platform
- Windows
Good Afternoon,
I wonder if anyone would be able to help.
I am writing a macro that adds a column to the end of a table, then renames that column with "Remaining PO DD-MMM-YY" with DD-MMM-YY being today's date. Previous columns will be kept, so I have to navigate to the cell.
I have got to this, but it doesn't seem to be working. I know it is probably something easy but I keep getting the attached error message.
Thank you in advance
CJG19
I wonder if anyone would be able to help.
I am writing a macro that adds a column to the end of a table, then renames that column with "Remaining PO DD-MMM-YY" with DD-MMM-YY being today's date. Previous columns will be kept, so I have to navigate to the cell.
I have got to this, but it doesn't seem to be working. I know it is probably something easy but I keep getting the attached error message.
VBA Code:
Sub Add_New()
LDate = Format(Date, "dd-mmm-yy")
Range("A3").End(xlToRight).Select
ActiveCell.Name = "Remaining PO" & " " & LDate
End Sub
Thank you in advance
CJG19