lundi 17 octobre 2016

VBA userform to execute selections only after hitting command button

I am having a hard time to make vba to execute my selection only after pressing the command button (The GO button in this case). Attached are the picture of the userform, which is not made by activeX control, and the code I am working on. Thanks!

Picture of Userform

Code of Userform

Private Sub MR_Click()

If MR.Value = True Then
Rows(6).Delete
End If
If MR.Value = False Then
Applicatioin.Undo
End If

End Sub

Private Sub PMS_Click()

If PMS.Value = True Then
Rows(7).Delete
End If

End Sub

Private Sub VOIDMR_Click()

If VOIDMR.Value = True Then
Rows(13).Delete
End If

End Sub

Private Sub VOIDPMS_Click()

If VOIDPMS.Value = True Then
Rows(14).Delete
End If

End Sub




Aucun commentaire:

Enregistrer un commentaire