How to lock the Data Controls' location from being altered by othe

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,

I have created a command button on one of my MS Excel worksheet, but I don't
wish that others could be able to alter my command button's location; let's
say I want the command button to be placed on 150 (top), 150 (left).

Although I have tried to use the protection feature offered in Visual Basic
Editor; but this only can protect others from viewing the codes & the
properties of the button, others still can move the button using mouse click
& drag!!!!

Is there any way that the location of the button can be locked????
Please advice if anyone out there has any ideal to do so.....
Thanking in advance.
 
If you use a button from the control toolbox, they need to go to design mode
before they could move it. Not perfect, but it is more effort.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
what actually i want is, a way to lock the button's location as the way the
codes and properties can; even in the design mode!!!
Which mean even one entered the design mode but some how he is not the
authorized person to do the editing; he has NO way to alter the button
location as well......

Could it be done in Macro????
 
Can't you just protect the worksheet ?

NickHK

Jac said:
what actually i want is, a way to lock the button's location as the way the
codes and properties can; even in the design mode!!!
Which mean even one entered the design mode but some how he is not the
authorized person to do the editing; he has NO way to alter the button
location as well......

Could it be done in Macro????
 
If the macro needs to insert a new row into the sheet & the button is below
the insertion point; after protected the workshheet and then run the macro,
will cause the system to have a run-time error '1004' Insert method of Range
class failed!!!!
 
Check the help on the WS.Protect method, especially the 5th argument:

Worksheets(2).Protect , , , , True
Rows("2:2").Insert Shift:=xlDown

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top