html - VBA to pull serial numbers from Cisco phones, failing from overload? -
i have list of ip addresses in column c , trying log each phone , serial number. code bugs out after reading 10-20 rows. when 20 rows works fine. idea why overloading?
option explicit sub pullthatserial() dim strip string dim strsn string dim surl string dim integer dim xml dim xmldoc set xml = createobject("microsoft.xmlhttp") = 2 809 on error resume next strip = range("c" & i) strsn = "" surl = "http://" & strip xml.open "get", surl, false xml.send set xmldoc = createobject("htmlfile") xmldoc = xml.responsetext '=== if xmldoc = "" strsn = "not connected" else 'macaddress = mid(xmldoc, instr(xmldoc, "mac address") + 45, 12) strsn = mid(xmldoc, instr(xmldoc, "serial number") + 47, 11) end if '=== range("d" & i) = strsn next set xml = nothing end sub
Comments
Post a Comment