K
Kim
Hi all,
I tried to record a macro to delete some column. Here is what I got but when
I run the macro it didn't performe correctly:
Sub Selection()
Sheets("Negotiation Tool Report").Select
Sheets("Negotiation Tool Report").Copy After:=Sheets(1)
Sheets("Negotiation Tool Report (2)").Select
Sheets("Negotiation Tool Report (2)").Name = "Selection"
Columns("A:A").Select
ActiveCell.Delete Shift:=xlToLeft
Columns("M:Z").Select
Selection.Delete Shift:=xlToLeft
Sheets.Add After:=Sheets(Sheets.Count)
When I run it keep come out as error on Selection.Delete. I've tried
changing Selection to ActiveCell but the result is that it select the cell
but didn't delete them.
Can anyone help?
Thanks.
Kim
I tried to record a macro to delete some column. Here is what I got but when
I run the macro it didn't performe correctly:
Sub Selection()
Sheets("Negotiation Tool Report").Select
Sheets("Negotiation Tool Report").Copy After:=Sheets(1)
Sheets("Negotiation Tool Report (2)").Select
Sheets("Negotiation Tool Report (2)").Name = "Selection"
Columns("A:A").Select
ActiveCell.Delete Shift:=xlToLeft
Columns("M:Z").Select
Selection.Delete Shift:=xlToLeft
Sheets.Add After:=Sheets(Sheets.Count)
When I run it keep come out as error on Selection.Delete. I've tried
changing Selection to ActiveCell but the result is that it select the cell
but didn't delete them.
Can anyone help?
Thanks.
Kim