11-04-2010, 09:14 AM
Hi,
I am gettingtype mismatch errror when I run the following code's if condition. can some one tell me what is wrong in my code.
Attached error image.
And one more thing I have another attribute primary="true" which is optional and may not show up for all the image nodes also have to be in if condition. How to code that
I am gettingtype mismatch errror when I run the following code's if condition. can some one tell me what is wrong in my code.
Attached error image.
And one more thing I have another attribute primary="true" which is optional and may not show up for all the image nodes also have to be in if condition. How to code that
Code:
Set urinode=xmlDoc.SelectSingleNode(imgcat)
imgcategory= urinode.getAttribute("category")
imgwidth=urinode.getAttribute("width")
imgheight=urinode.getAttribute("height")
nodepath1 = "/on/programs/program[" & i& "]/images/image[" & j & "]/URI/text()"
Set node = xmlDoc.SelectSingleNode(nodepath1)
If ((imgcategory="Poster Art")&(imgwidth="72")&(imgheight="108")) then
xlSheet.Rows(nRow).Columns(iCol).value=TMS
xlSheet.Rows(nRow).Columns(iCol+1).value=node.NodeValue
xlSheet.Rows(nRow).Columns(iCol+2).value=imgcategory
xlSheet.Rows(nRow).Columns(iCol+3).value=Yes
else
xlSheet.Rows(nRow).Columns(iCol).value=TMS
xlSheet.Rows(nRow).Columns(iCol+1).value=node.NodeValue
xlSheet.Rows(nRow).Columns(iCol+2).value=imgcategory
End If