Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I’m not a programmer but I have cobbled together some VBA to call a web service. I have a problem with nil returns that I’d be very very grateful for some help with… When I get a valid XML response the following code works fine….. -If oDom.HasChildNodes Then Worksheets("Sheet1").Range("c4").Value oDom.DocumentElement.SelectSingleNode("record/offer/for").Text- But when there is not a valid response I get an XML response is like this: -<nil-classes type="array"/ − <!-- {:fetched_at=Tue Jan 19 00:09:50 -0800 2010, :expires_in=1800 seconds} --- I then get the VBA error “*-object variable or with variable not set-*" I from the following line of code -oDom.DocumentElement.SelectSingleNode("record/offer/for").Text- In both situations haschildnodes is true, so how do I determine if I’ve had a valid response or not without getting the VBA error? Many many thanks DEC -- dec3 ------------------------------------------------------------------------ dec3's Profile: 1398 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=171272 Microsoft Office Help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run-time error 91: Object Variable or With block variable not set | Excel Programming | |||
Run-Time error '91': Object variable of With block variable not set | Excel Programming | |||
Run-time error '91': "Object variable or With block variable not set | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming | |||
Object variable problem | Excel Programming |