Data query with protected cells

Tempest0

New Member
Joined
Nov 20, 2008
Messages
31
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
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,203,174
Messages
6,053,912
Members
444,694
Latest member
JacquiDaly

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top