So I'm trying to do something this
dim myOrderID As Integer
myOrderID = 1
Set Ordercount = objxmldoc.selectNodes("//order[orderid=myOrderID]")
....in other words, embed a variable in the selection criteria for selectNodes . From the googling I've done, apparently I can't (ref: XPath variable for searching attribute ), but I can perhaps use something called a string construct...I have no idea what that means ...or more to the point how I'd do it in VBA?!
Try:
Set Ordercount = objxmldoc.selectNodes("//order[orderid=" & myOrderID & "]")