For the Copying and Pasting I have this:
I am unsure to as why it will not get the Column Index number for this line:
intColNum2 = WorksheetFunction.Match("FLEET_ID", wsExport.Range("1:1"), 0)
but not for this line:
intColNum2 = WorksheetFunction.Match("FLEET_ID", wsImport.Range("1:1"), 0)
wsImport is set to the active sheet. But it says "Run time error 1004. Unable to get the Match Function of the WorksheetProperty Class"
I'd prefer not to hardcode the Index in, as there may be columns added. It is unlikely that the Column names will change.
Bookmarks