Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Refresh and Protecting a Sheet
Hello Everyone,
Using excel 2003. Quick Question - I have an excel spreadsheet that is "sheet protected". I have an ODBC connection that refreshes the spreadsheet when it is opened, so in the On_Open event of the workbook I have code to unprotect the sheet so the refresh will work. Here's the question. Where in the world can I place the code to reprotect the workbook after the user clicks the "Enable automatic refresh' button. Any help appreciated. Thanks Ray |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Refresh and Protecting a Sheet
On Apr 16, 9:46*pm, eighthman11 wrote:
Hello Everyone, Using excel 2003. Quick Question - I have an excel spreadsheet that is "sheet protected". *I have an ODBC connection that refreshes the spreadsheet when it is opened, so in the On_Open event of the workbook I have code to unprotect the sheet so the refresh will work. Here's the question. *Where in the world can I place the code to reprotect the workbook after the user clicks the "Enable automatic refresh' button. *Any help appreciated. *Thanks Ray Ray, Could you copy your code so we can see what the automatic refresh does? Ie how often it refreshes and so on? It'll be much easier to see what you're asking then. Regards, Alex |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Refresh and Protecting a Sheet
On Apr 17, 5:27*am, Alex Simmons wrote:
On Apr 16, wrote: Hello Everyone, Using excel 2003. Quick Question - I have an excel spreadsheet that is "sheet protected". *I have an ODBC connection that refreshes the spreadsheet when it is opened, so in the On_Open event of the workbook I have code to unprotect the sheet so the refresh will work. Here's the question. *Where in the world can I place the code to reprotect the workbook after the user clicks the "Enable automatic refresh' button. *Any help appreciated. *Thanks Ray Ray, Could you copy your code so we can see what the automatic refresh does? Ie how often it refreshes and so on? It'll be much easier to see what you're asking then. Regards, Alex Alex, I did an "Import Data" from the "Data" tab and then clicked on the "Data Range Property" so I could select to have the spreadsheat refreshed when it is opened. The spreadsheet is protected so I had to unprotect it with code when the spreadsheet is opened. Now after the refresh I need to reprotect it but I don't know where to place the code. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Refresh and Protecting a Sheet
On Apr 17, 5:19*pm, eighthman11 wrote:
On Apr 17, 5:27*am, Alex Simmons wrote: On Apr 16, wrote: Hello Everyone, Using excel 2003. Quick Question - I have an excel spreadsheet that is "sheet protected". *I have an ODBC connection that refreshes the spreadsheet when it is opened, so in the On_Open event of the workbook I have code to unprotect the sheet so the refresh will work. Here's the question. *Where in the world can I place the code to reprotect the workbook after the user clicks the "Enable automatic refresh' button. *Any help appreciated. *Thanks Ray Ray, Could you copy your code so we can see what the automatic refresh does? Ie how often it refreshes and so on? It'll be much easier to see what you're asking then. Regards, Alex Alex, I did an "Import Data" from the "Data" tab and then clicked on the "Data Range Property" so I could select to have the spreadsheat refreshed when it is opened. *The spreadsheet is protected so I had to unprotect it with code when the spreadsheet is opened. *Now after the refresh I need to reprotect it but I don't know where to place the code. It should be the last part of the procedure - just add something like: Worksheets("Sheet1").Protect "password" Which will then re-protect the sheet. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
protecting formulas without protecting sheet so grouping still wor | Excel Discussion (Misc queries) | |||
Copy Excel functions formula and auto refresh refresh | Excel Worksheet Functions | |||
how can I auto refresh pivot table with sheet protection | Excel Discussion (Misc queries) | |||
Sheet protection code conflicts with Pivot Table "auto refresh" | Excel Discussion (Misc queries) | |||
Auto Protecting cells & auto filling date | Excel Discussion (Misc queries) |