Drake,
I don't think you need the NOT operator. Try:
If ComboTest.Value = "Test1" And rcell1.Text <> "Test1" Then
MsgBox "Wrong!"
I tested the follwing in a Word table and it worked fine:
Sub Test()
Dim oTbl As Table
Set oTbl = ActiveDocument.Tables(1)
If Left(oTbl.Cell(1, 1).Range, Len(oTbl.Cell(1, 1).Range) - 2) _
= "Test1" And _
Left(oTbl.Cell(1, 2).Range, Len(oTbl.Cell(1, 2).Range) - 2) _
<> "Test1" Then
MsgBox "Wrong"
End If
End Sub

Signature
Greg Maxey/Word MVP
A Peer in Peer to Peer Support
> Hi again -
>
[quoted text clipped - 8 lines]
>
> MsgBox "Wrong!"
Drake - 08 Feb 2005 04:45 GMT
Greg -
this is perfect! Thank you!
> Drake,
>
[quoted text clipped - 33 lines]
>>
>> MsgBox "Wrong!"
Drake - 10 Feb 2005 21:15 GMT
Greg,
I am getting a Code 424 Error - Object Required. I think I did exactly as
you specified. It appeared to work when the text was one word only, but it
is having problems with the multiple words. Any thoughts?
------------------
Dim oTbl As Table
Set oTbl = ActiveDocument.Tables(2)
Combobox.Value = "test1" And _
Left(oTbl.Cell(1, 4).Range, Len(oTbl.Cell(1,4).Range) - 2) <> "This is
another test" Or _
Combobox.Value = "test2" And _
Left(oTbl.Cell(1, 4).Range, Len(oTbl.Cell(1,4).Range) - 2) <> "This is
another test 2" Or _
------------
> Drake,
>
[quoted text clipped - 33 lines]
> >
> > MsgBox "Wrong!"
Greg - 10 Feb 2005 21:47 GMT
Drake,
The only thing obvious is that you code appears to be missing the "IF"
condition.
I don't have a document with a Combobox so it is hard to help figure
out what might be going on.
Sorry.
Drake - 10 Feb 2005 21:51 GMT
Okay - did some more testing and was able to get beyond the error. Now, it
just keeps acting as if the two don't match, even when they do.
> Drake,
>
[quoted text clipped - 5 lines]
>
> Sorry.
Drake - 10 Feb 2005 22:20 GMT
Disregard! I think I've got it! Thanks.
> Drake,
>
[quoted text clipped - 5 lines]
>
> Sorry.
NOT is a unary operator that returns the logical opposite of what follows.
Its argument must be something that VBA can evaluate as a boolean (ie a
logical value or a number) and the result is always a boolean. You could use
If ComboTest.Value = "Test1" And Not rcell1.Text = "Test1" then ....
because (rcell1.Text = "Test1") evaluates to true or false.
But Greg's suggestion is better.
> Hi again -
>
[quoted text clipped - 7 lines]
>
> MsgBox "Wrong!"