这两种方法可以,但是有没有办法实现更简单的方法:
If Tables("表a").Current("第一列") = "PD1" or Tables("表a").Current("第一列") = "PD2" Then
if Tables("表a").Current("第二列") = True
msgbox("正确")
elseIf Tables("表a").Current("第一列") = "PD3" or Tables("表a").Current("第一列") = "PD3" Then
if Tables("表a").Current("第二列") = True
msgbox("正确")
else
msgbox("错误")
end if
If Tables("表a").Current("第一列") = "PD1" andalso if Tables("表a").Current("第二列") = True then
msgbox("正确")
else or Tables("表a").Current("第一列") = "PD2" andalso if Tables("表a").Current("第二列") = True then
msgbox("正确")
else
msgbox("错误")
end if