Re: not equal to
- From: C''''est_moi <Cestmoi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 15 Jan 2009 11:52:04 -0800
Thank you Greg. This seems a little advanced for me. I solved the problem for
now like this
IF "my command below"
exit sub (thus nothing happens and the sentence stays where I want it to stay)
ELSE "delete sentence I wanted to delete".
So, if I user chooses AAA in DD1 OR in DD2, the sentence stays. If user
chooses anything else than AAA, sentence is erased.
Thx again for your quick reply.
--
Merci/Thank you.
"Greg Maxey" wrote:
.
Not sure I understand exactly what you are looking for, but one of the two
OR or AND functions illustrated below should work:
Sub ScratchMacro()
Dim pAstr As String
Dim pBStr As String
pAstr = "AAA"
pBStr = "AZA"
If Not pAstr = "AAA" Or Not pBStr = "AAA" Then
MsgBox "Do this"
Else
MsgBox "Do that"
End If
If Not pAstr = "AAA" And Not pBStr = "AAA" Then
MsgBox "Do this"
Else
MsgBox "Do that"
End If
End Sub
C''''est_moi wrote:
Again, in dire need of help. I need to have a sentence disappear if
the result of two different DD (each with 10 choices in them) is NOT
equal to something (both results are the same, below "AAA").
If ActiveDocument.FormFields("xxx").Result = "AAA" Or
ActiveDocument.FormFields("yyy") = "AAA" then
That is the command that I came up with and which works perfectly
fine in erasing my sentence but I want the contrary. I tried adding
= false
at the end but that does not work either. And I cannot find any "is
not equal to" command.
Merci/Thank you for any help anyone can provide.
Carmen
--
Greg Maxey - Word MVP
My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org
- References:
- not equal to
- From: C''''est_moi
- Re: not equal to
- From: Greg Maxey
- not equal to
- Prev by Date: Re: Paragraph Formatting
- Next by Date: RE: Table of Contents problem
- Previous by thread: Re: not equal to
- Next by thread: Re: not equal to
- Index(es):
Relevant Pages
|