Forum Discussion
Arcade_Printing
Dec 20, 2022Copper Contributor
VBA code is sorting on some worksheet but not all
i have a vba code to search out a worksheet and then sort by date. it was working on the original 15 sheets i had in the workbook. when i copied and added a 16th worksheet it does not run the sort on...
HansVogelaar
Dec 20, 2022MVP
If you change the line
With Workbooks("30#group.xlsm").Worksheets("22").Sort
to
With ActiveSheet.Sort
you should be able to run the macro on the active sheet, whichever sheet that is...