Hi,
Everyday I receive an open call list. My macro works great if I run ccleaner before hand. If I run the macro on different days it errors. I know it is hanging up on the title CRM Activity Report. Is there a way to compensate for the title changing to multiple copies? IE CRM Activity Report (2).
' Sort Data
ActiveWorkbook.Worksheets("CRM Activity Report").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("CRM Activity Report").Sort.SortFields.Add Key:= _
Range("C2:C99"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
I have been using excelisfun on youtube to learn more and have found out that I can clean up the macro a little bit IE range.
Thanks for the help.
Everyday I receive an open call list. My macro works great if I run ccleaner before hand. If I run the macro on different days it errors. I know it is hanging up on the title CRM Activity Report. Is there a way to compensate for the title changing to multiple copies? IE CRM Activity Report (2).
' Sort Data
ActiveWorkbook.Worksheets("CRM Activity Report").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("CRM Activity Report").Sort.SortFields.Add Key:= _
Range("C2:C99"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
I have been using excelisfun on youtube to learn more and have found out that I can clean up the macro a little bit IE range.
Thanks for the help.