I am creating an automated work log/invoicing system for a motor repair company. Work is entered into a job sheet and I have various cells where I have set data validation using lists (customer ID, vehicle reg etc). These reference entries in Excel tables. For example, the Customer ID cell is validated using range name =CustomerIDs, and this name references =tblCustomers[ID]. (Data validation doesn't recognise Excel tables, hence the round-the-houses approach). These range names are scoped at the worksheet level.
My problem is this. The company obviously has many jobs on at any given time. I therefore have a hidden master job sheet. When a new job comes in, they create a Job Sheet for it by running a VBA macro to copy the master and number the copy with the next Job ID. All of this works fine. But I have noticed that all the range names used by my data validation lists are duplicated (scoped to sheet level), for each new job sheet. If I delete the duplicate names, the data validation drop-down lists still work fine, as they are pointing to the workbook scoped original name.
How can I stop these sheet-level dplicate range names from being created - or how can I dleete them in code?
My problem is this. The company obviously has many jobs on at any given time. I therefore have a hidden master job sheet. When a new job comes in, they create a Job Sheet for it by running a VBA macro to copy the master and number the copy with the next Job ID. All of this works fine. But I have noticed that all the range names used by my data validation lists are duplicated (scoped to sheet level), for each new job sheet. If I delete the duplicate names, the data validation drop-down lists still work fine, as they are pointing to the workbook scoped original name.
How can I stop these sheet-level dplicate range names from being created - or how can I dleete them in code?