I have a facility whereby I import data from Excel spreadsheets into Access using some VBA code.
The users have the ability to add new worksheets to their files (seldom used in practice) and I add these new names to my master list, together with some other attributes, and all sheets are thereafter automatically imported using DoCmd.Transferspreadsheet.
The problem for me is that someone has added a worksheet name with an ampersand in it. VBA then fails to import it (I've suppressed the messages so can't remember what (if anything) was reported when it failed) and chugs onto the next sheet.
Is there any way around this - should I hold the sheet name with a double ampersand in my master list? Otherwise, should I just keep asking users not to give Excel sheets name with an ampersand in them?
The users have the ability to add new worksheets to their files (seldom used in practice) and I add these new names to my master list, together with some other attributes, and all sheets are thereafter automatically imported using DoCmd.Transferspreadsheet.
The problem for me is that someone has added a worksheet name with an ampersand in it. VBA then fails to import it (I've suppressed the messages so can't remember what (if anything) was reported when it failed) and chugs onto the next sheet.
Is there any way around this - should I hold the sheet name with a double ampersand in my master list? Otherwise, should I just keep asking users not to give Excel sheets name with an ampersand in them?