From: johnnykunst on
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".

---
frmsrcurl: http://msgroups.net/microsoft.public.word.vba.general
From: Doug Robbins - Word MVP on
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

"johnnykunst" <user(a)msgroups.net/> wrote in message
news:#Gdt8x0#KHA.5168(a)TK2MSFTNGP05.phx.gbl...
> 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".
>
> ---
> frmsrcurl: http://msgroups.net/microsoft.public.word.vba.general

From: johnnykunst on
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.

---
frmsrcurl: http://msgroups.net/microsoft.public.word.vba.general/Delete-a-command-button-on-a-protected-sheet
From: Doug Robbins - Word MVP on
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

"johnnykunst" <user(a)msgroups.net/> wrote in message
news:ugErZ#8#KHA.5476(a)TK2MSFTNGP06.phx.gbl...
> 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.
>
> ---
> frmsrcurl:
> http://msgroups.net/microsoft.public.word.vba.general/Delete-a-command-button-on-a-protected-sheet

From: johnnykunst on
This works great, my form is completed, thanks for your help.

---
frmsrcurl: http://msgroups.net/microsoft.public.word.vba.general/Delete-a-command-button-on-a-protected-sheet