0
有没有一种优雅的方式来写一个如果A或B或C那么X否则不做任何声明?例如。紧凑的错误检查
If WorksheetFunction.CountA(Range("J:J")) <> SymbolCount Then
MsgBox "Check column J in Estate worksheet for fill completion"
End If
If WorksheetFunction.CountA(Range("K:K")) <> SymbolCount Then
MsgBox "Check column K in Estate worksheet for fill completion"
End If
我能想到的最有创意的解决方案是增加的CountAs,看看它是否匹配符号计数* NumberOfTests,但是这将意味着放弃非特异性应答消息。