Delete a command button on a protected sheet

J

johnnykunst

How would I set a macro to delete a command button on a protected sheet- I'd wan't to be able to fire it from within another macro using "Call".
 
D

Doug Robbins - Word MVP

If that is the way you are firing it, why have it at all? Just have the
other macro perform whatever function is assigned to it.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
J

johnnykunst

The user clicks the command button on the form and fires a save process which creates a new document- I'd like part of that save process to be removing the button itself as I don't want it in documents created by users of the form.
 
D

Doug Robbins - Word MVP

It would be better if you showed the code of your macro. However if the
macro does not move the selection, you may be able to use

With ActiveDocument
.Unprotect
Selection.Fields(1).Delete
.Protect wdAllowOnlyFormFields, NoReset
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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

Top