H
Harry F.
Hi,
I'm trying to generate message box if a particular string of text is
entered into a form field via a macro. The code I'm using is below, can
someone point out where I'm wrong?
Thanks,
Harry
Sub Leave_Field()
'
' Leave_Field Macro
' Macro created 4/24/2007 by Henry Fanelli
'
If ActiveDocument.Bookmarks("Swift1").Range.Text = "UBSWUS33" Or
ActiveDocument.Bookmarks("Swift1").Range.Text = "UBSWUS33XXX" Then
MsgBox "UBSWUS33 or UBSWUS33XXX should only be used for Wealth Management
International (WMI) accounts.", vbInformation, "Notice"
End If
End Sub
I'm trying to generate message box if a particular string of text is
entered into a form field via a macro. The code I'm using is below, can
someone point out where I'm wrong?
Thanks,
Harry
Sub Leave_Field()
'
' Leave_Field Macro
' Macro created 4/24/2007 by Henry Fanelli
'
If ActiveDocument.Bookmarks("Swift1").Range.Text = "UBSWUS33" Or
ActiveDocument.Bookmarks("Swift1").Range.Text = "UBSWUS33XXX" Then
MsgBox "UBSWUS33 or UBSWUS33XXX should only be used for Wealth Management
International (WMI) accounts.", vbInformation, "Notice"
End If
End Sub