Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
protecting formulas without protecting sheet so grouping still wor JM Excel Discussion (Misc queries) 1 June 4th 09 06:42 AM
password protecting a column for data entry in a sheet, how? kashi Excel Worksheet Functions 1 June 26th 07 03:09 AM
automatic column sorting problem when protecting sheet Montana Excel Worksheet Functions 3 May 17th 07 09:55 AM
I can't insert a new column in a sheet TelescopeBoy Excel Discussion (Misc queries) 2 January 23rd 06 09:13 PM
How do I lock the Column without Protecting the Sheet sgmoorthy Excel Discussion (Misc queries) 2 November 4th 05 02:00 PM


All times are GMT +1. The time now is 12:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"