Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Reed Markley
 
Posts: n/a
Default Protect Only an Object on a Worksheet

Hi All:
In Excel XP (2002), how do I protect only a pushbutton object, so users
won't reformat or delete it. I want to leave the rest of the sheet
completely unprotected, since I am using a VBA form to modify and add data
to the worksheet. The button launches the form. I have set all the cells on
the sheet to be unlocked by selecting all the cells on the sheet and
unchecking the checkbox in the format cells dialog. I then go to
Tools-Protection-Protect Sheet and check all the checkboxes except the ones
to allow users to edit objects and scenarios and to select locked cells. I
check the Protect worksheet and contents of locked cells checkbox and hit
OK. Theoretically, only objects should be protected. There are no scenarios
or locked cells on the sheet. The object (button) is indeed protected. I
then push the button to launch the data entry form and get the following VBA
message. Run-time error '1004': Delete method of Range class failed. Te code
behind the form does indeed delete a cell at the start. The form does not
appear. If I select debug on the error message I am taken to the code
performing the delete operation.

What am I doing wrong. I had no trouble getting this technique to function
properly in Excel 2000.

--
Best Regards
Reed W. Markley
Kahiltna Software


  #2   Report Post  
Posted to microsoft.public.excel.misc
davesexcel
 
Posts: n/a
Default Protect Only an Object on a Worksheet


I
then push the button to launch the data entry form and get the
following VBA
message. Run-time error '1004': Delete method of Range class failed. Te
code
behind the form does indeed delete a cell at the start. The form does
not
appear. If I select debug on the error message I am taken to the code
performing the delete operation.

When you message comes up, have you pressed help to see what was up?
Does the message come up only when there is nothing to delete?

Just wondering, need more info,
I have had macros that searched for a word and delete the row, if it
couldn't find the word I would get an error, so ended needing some
extra code like
on error exit sub


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=522047

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
How Do I Protect A Worksheet But Allow Copying Columns KMH Excel Discussion (Misc queries) 1 January 3rd 06 03:51 PM
How can I protect Excel Worksheet and allow users to UnGroup Data terry Excel Worksheet Functions 1 December 31st 05 03:57 PM
Comparing a list to a Calendar worksheet. PatrickL Excel Worksheet Functions 0 August 25th 05 04:21 PM
Linking an object in power point to a excel worksheet jth Excel Discussion (Misc queries) 3 July 24th 05 02:16 AM
Cannot protect worksheet if it includes a list Elladene Excel Worksheet Functions 0 June 23rd 05 08:09 PM


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

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

About Us

"It's about Microsoft Excel"