How evaluate concatenated string as indexed XPath expression in VB6
问题 I've built an Xpath expression by concatenating strings in VB6: strXPath = "xDOC.selectNodes(" & """/GroupType1""" & ").item(" & CStr(i) & ").selectNodes(" & """/OperationStageCollection/OperationStage""" & ").length" "i" is an integer used to index into I want to evaluate strXPath to get a loop counter, for example: n = CInt(strXPath) n is declared as Integer; strXPath is declared as string. VB6 throws a Type Mismatch error on the above evaluation expression. I must be missing something