VBA function to include CDATA -


i have following function include cdata:

function cdatasection()     dim objdom domdocument     dim objkmlrootelement ikmldomelement     dim objkmlelement ikmldomelement     dim cdata ikmldomcdatasection      set objdom = new domdocument     set objkmlrootelement = objdom.createelement("balloonstyle")     objdom.appendchild objkmlrootelement     set objkmlelement = objdom.createelement("text")     objkmlrootelement.appendchild objkmlelement     set cdata = objdom.createcdatasection("text")     cdata.data = "<![cdata[<b>latitude = $[latitude]</b>?]]>;" end function 

when run above, getting error "user defined data type not found" function.

yes ripster says find library reference. vba window tools>references

for list of relevant references see...

http://msdn.microsoft.com/en-us/library/windows/desktop/ms763701%28v=vs.85%29.aspx

however, if have hard time tracking down reference, replace dim statements , set objdom = new domdocument to...

dim objdom object set objdom = createobject("microsoft.xmldom") ' edit: if not work, try... 'set objdom = createobject("msxml22.domdocument.6.0")   dim objkmlrootelement object dim objkmlelement object     dim cdata object 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -