I have VBA code in excel and as part of that I launch a document in Word and populate ActiveX textboxes with information that was populated in the Excel userform.
However, in some instances, I want the code to delete the ActiveX textbox instead of populating it. Can anyone tell me how to accomplish this task.
Here is my code. It is the "No" option that I am referencing that doesn't work.
If frmRLRP.cboPrivilege.Value = "Yes" Then
wdDoc.txtPrivilege.Text = "Privilege of Commutation shall be granted to my beneficiary(ies)."
ElseIf frmRLRP.cboPrivilege.Value = "No" Then
wdDoc.txtPrivilege.DeleteShape
End If
I would appreciate any help.
However, in some instances, I want the code to delete the ActiveX textbox instead of populating it. Can anyone tell me how to accomplish this task.
Here is my code. It is the "No" option that I am referencing that doesn't work.
If frmRLRP.cboPrivilege.Value = "Yes" Then
wdDoc.txtPrivilege.Text = "Privilege of Commutation shall be granted to my beneficiary(ies)."
ElseIf frmRLRP.cboPrivilege.Value = "No" Then
wdDoc.txtPrivilege.DeleteShape
End If
I would appreciate any help.