Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Insert Column without protecting sheet.
Hi Steven,
Can you add code to your macros to unprotect the sheet to perform their functions, then protect the sheet before they end. This would be as simple as writing two subs, one to protect <WksProtect(), and one to unprotect <WksUnprotect(). This gives you all the benefits of sheet protection and your macros won't return an error. To use, try something like this: Sub MyMacro1() ' Performs some procedure yada, yada... WksUnprotect 'procedure code here... WksProtect End Sub Hope this helps! GS "Steven" wrote: Why I cannot protect the sheet: The problem is that I have an autofilter across row 10. There are Private Sub macros and the VBA code is password protected. So to run the macros I put rectangles with the drawing toolbar and assigned macros so when the user clicks the rectangle it runs the assigned macro which most of the macros preform a funtion on the autofilter. When I protected the sheet I could manually do the autofilter but it would error if I tried to run the macro by clicking the rectangle box. But I want to prevent Inserting or Deleting Columns in the workwheet. Question: Is there a way to disable or prevent inserting or deleting columns in a worksheet without protecting the sheet? Thank you for your help. Steven |
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) | |||
password protecting a column for data entry in a sheet, how? | Excel Worksheet Functions | |||
automatic column sorting problem when protecting sheet | Excel Worksheet Functions | |||
I can't insert a new column in a sheet | Excel Discussion (Misc queries) | |||
How do I lock the Column without Protecting the Sheet | Excel Discussion (Misc queries) |