EngSantiago
New Member
- Joined
- Mar 19, 2014
- Messages
- 17
- Office Version
- 365
- Platform
- Windows
Hi all,
It's been a few years since I don't create a macro from scratch and I'm scratching with a simple issue here. I'm basically duplicating the "Default" sheet and naming it as "BOM Analysis". I'm setting the new sheet as active but the cut-insert code making the changes on the "Default" sheet not on the "BOM Analysis" sheet. How do I fix this?
It's been a few years since I don't create a macro from scratch and I'm scratching with a simple issue here. I'm basically duplicating the "Default" sheet and naming it as "BOM Analysis". I'm setting the new sheet as active but the cut-insert code making the changes on the "Default" sheet not on the "BOM Analysis" sheet. How do I fix this?
VBA Code:
Sub CleanUpBOM()
Sheets("Default").Copy Before:=Sheets(Sheets.Count)
ActiveSheet.Name = "BOM Analysis"
Sheets("BOM Analysis").Columns("A:G").AutoFit
Sheets("BOM Analysis").Activate
ActiveSheet.Cells(2, 2).Select
Columns("D:D").Cut
Columns("H:H").Insert Shift:=xlToRight
'more to come :)
End Sub