Johnny Thunder
Well-known Member
- Joined
- Apr 9, 2010
- Messages
- 693
- Office Version
- 2016
- Platform
- MacOS
Hi guys,
Stuck on a problem with my code, I am creating a new sheet and then doing a copy paste function to get the data onto my newly created workbook/Sheet but for some reasons I can't deselect the pasted cells. Maybe someone can see a problem or a solution for my issue.
My code:
Stuck on a problem with my code, I am creating a new sheet and then doing a copy paste function to get the data onto my newly created workbook/Sheet but for some reasons I can't deselect the pasted cells. Maybe someone can see a problem or a solution for my issue.
My code:
Code:
With nW.Sheets("By-Account").Range("A1")
.PasteSpecial xlPasteValues
.PasteSpecial xlPasteFormats
Application.CutCopyMode = False ' Clears Clipboard
Range("A1").Select 'Where I am trying to deselct the pasted sheet
ActiveSheet.Outline.ShowLevels ColumnLevels:=1
ActiveSheet.Outline.ShowLevels RowLevels:=1
Columns("A").Hidden = True ' Hide Columns and rows with lookup criteria