I'm Trying to Delete Parragraph(s) using Several ActiveX Control Buttons
Code: Select all
Sub DeleteCurrentParagraph()
On Error GoTo Skip
ActiveDocument.Unprotect Password:=""
Skip:
Selection.StartOf Unit:=wdParagraph
Selection.MoveEnd Unit:=wdParagraph
Selection.Delete
ActiveDocument.Protect _
Type:=wdAllowOnlyFormFields, NoReset:=False, Password:=""
End Sub
Private Sub CommandButton1_Click()
DeleteCurrentParagraph
End Sub
Private Sub CommandButton2_Click()
DeleteCurrentParagraph
End Sub
Private Sub CommandButton3_Click()
DeleteCurrentParagraph
End Sub
Basically only the first button I press works, and all the others stop working.
Is there a way to correct this?
Thank you in advance.