I have three separate workbooks for three separate subcontractors, workbook A, workbook B, and workbook C. The layout is the same since the first was developed and the other two 'Saveas' to new file names. All data is entered into a worksheet with the same name in all three files. I found a Macro to separate the data into separate worksheets within the workbook based on Column A. The macro was entered into a separate macro workbook as a Module. I leave the macro workbook open. When I open workbook A, the macro works like a dream. When I close workbook A and open workbook B or C and run the macro, I receive an error "Database or list range not valid'. When I run the debug, it highlights the below code in the macro.
'Get a temporary list of unique values from column A
ws.Columns(vCol).SpecialCells(xlConstants).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=ws.Range("EE1"), Unique:=True
Why will it work for Workbook A but not B or C?
'Get a temporary list of unique values from column A
ws.Columns(vCol).SpecialCells(xlConstants).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=ws.Range("EE1"), Unique:=True
Why will it work for Workbook A but not B or C?