This code line: tempURL = collUrlNamespace("{" & parts(9) & "}{" & parts(7) _ & "}{" & parts(10) & "}") is giving Run-time error '5' : Invalid procedure call or argument.