I have a workbook that automatically updates a query from access when the workbook is opened and it also removes the data before the workbook is closed. This is all done through the database connections tab. It is not done via VBA coding. What I need is one of 2 things to happen though.
1) I need to have the data sheet that is being updated to be protected so that the users can not change any of the cells. The problem is that the data query will not update with protected cells and I can not figure out how to unprotect the cells to allow the data query to update, then automatically protect the cells again after the query is complete.
2) How can I detect that the query is complete and automatically start a macro to protect the worksheet? I want to have sort of a "Welcome" tab which will open up initially while the 5 other worksheet tabs are being updated. Once the update is complete, then start a macro to display a message to the user that the update is complete. When the user activates any of the other tabs, then the worksheet can be protected via the worksheet_activate event.
I know how to do all of the coding for the protecting and unprotecting of the sheets through VBA, but I do not know how to start the macro as soon as the data query is completed.
Can anyone please help? I am really struggling with this.
I can't supply any code because there is no code yet.
Thanks
1) I need to have the data sheet that is being updated to be protected so that the users can not change any of the cells. The problem is that the data query will not update with protected cells and I can not figure out how to unprotect the cells to allow the data query to update, then automatically protect the cells again after the query is complete.
2) How can I detect that the query is complete and automatically start a macro to protect the worksheet? I want to have sort of a "Welcome" tab which will open up initially while the 5 other worksheet tabs are being updated. Once the update is complete, then start a macro to display a message to the user that the update is complete. When the user activates any of the other tabs, then the worksheet can be protected via the worksheet_activate event.
I know how to do all of the coding for the protecting and unprotecting of the sheets through VBA, but I do not know how to start the macro as soon as the data query is completed.
Can anyone please help? I am really struggling with this.
I can't supply any code because there is no code yet.
Thanks