#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2009
    Posts
    65
    Rep Power
    15

    Object required 'XMLDOC'


    Below is the code I am using, however getting an error (using Windows 7) - any ideas on how to workaround the problem?

    CODE:
    Code:
    Set xlmdoc = CreateObject("Microsoft.XMLDOM")
    sXmlFilePath = "C:\Sample_file.config"
    If xmldoc.load(sXmlFilePath) Then
     'blah
    End If
    ERROR:
    Microsoft VBScript runtime error: Object required: 'xmldoc'
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2009
    Posts
    65
    Rep Power
    15
    Never mind - problem solved - it's evident in the code (line 1 and line 3)...should have used Option Explicit!

    Comments on this post

    • medialint agrees : haha! Yes explict would help you see that sooner. Glad you spotted it yourself.

IMN logo majestic logo threadwatch logo seochat tools logo