I have the Protection turned on in my Workbook in order to prevent Users from creating new Sheets. One of the things I need Users to do is load a specific Access Database into one of the Sheets; however I need to allow them to choose the file from wherever they have it stored and I also need to allow them to 'transform' the data ahead of the import. Normally, I would provide the Users with instructions that guide them to the "Data/New Query/From Database" menu. The PROBLEM is ... that option is greyed-out whenever Workbook Protection is turned on.
Since I can't allow the Protection to be turned off and that menu path is greyed-out, my only recourse is to write a macro to perform that workflow for them. The problem I am facing is that the macro needs to literally type-in the query criteria as it goes (i.e. Let Source= ... etc.) and I'm not able to insert references to variables in that string. I've tried EVERYTHING to automate these steps; but nothing is working. Any ideas?
Since I can't allow the Protection to be turned off and that menu path is greyed-out, my only recourse is to write a macro to perform that workflow for them. The problem I am facing is that the macro needs to literally type-in the query criteria as it goes (i.e. Let Source= ... etc.) and I'm not able to insert references to variables in that string. I've tried EVERYTHING to automate these steps; but nothing is working. Any ideas?