MaddogJason
New Member
- Joined
- Jan 30, 2021
- Messages
- 24
- Office Version
- 365
- Platform
- Windows
I recorded a macro that worked well on any sheet. But when I recorded a macro that included the Sort Filter tab in only worked on that specific sheet.
The code included this:
ActiveWorkbook.Worksheets("His 9 Grade").Sort.SortFields.Clear
So my guess is that it for some reason specifies for which worksheet the macro applies.
How do I change it so that it will work on any worksheet?
The code included this:
ActiveWorkbook.Worksheets("His 9 Grade").Sort.SortFields.Clear
So my guess is that it for some reason specifies for which worksheet the macro applies.
How do I change it so that it will work on any worksheet?