Consulting

Results 1 to 3 of 3

Thread: xml download "argument not optional"

  1. #1
    VBAX Regular
    Joined
    Jun 2012
    Posts
    19
    Location

    xml download "argument not optional"

    I am trying to convert some code from single sheet to multi-sheet so I can use in an existing excel workbook - up to 70 wk sheets

    It is in Public Sub LoadRaceField(wks As Worksheet)


    If accepts:- Set runnerList = xmldoc.SelectNodes("//Runner")

    For I = 0 To (runnerList.Length - 1)


    Set runner = runnerList.Item(I)

    Set runnerNumber = runner.Attributes.getNamedItem("RunnerNo")



    but then rejects:-


    Set poolList = xmldoc.SelectNodes("//Pool")


    For J = 0 To (poolList.Length - 1)


    Set Pool = poolList.Item(J) GETS STOPPED HERE WHEN COMPILING


    Set poolwin = Pool.Attributes.getNamedItem("PoolType")


    Any help would be greatly appreciated.


    Ta,


    Martin











  2. #2
    VBAX Regular
    Joined
    Jun 2012
    Posts
    19
    Location

    Got it

    Got the solution Pool needed to be Poola or anything different than Pool as it is already being used

    Ta,
    Martin

    Quote Originally Posted by Martinw View Post
    I am trying to convert some code from single sheet to multi-sheet so I can use in an existing excel workbook - up to 70 wk sheets

    It is in Public Sub LoadRaceField(wks As Worksheet)


    If accepts:- Set runnerList = xmldoc.SelectNodes("//Runner")

    For I = 0 To (runnerList.Length - 1)


    Set runner = runnerList.Item(I)

    Set runnerNumber = runner.Attributes.getNamedItem("RunnerNo")



    but then rejects:-


    Set poolList = xmldoc.SelectNodes("//Pool")


    For J = 0 To (poolList.Length - 1)


    Set Pool = poolList.Item(J) GETS STOPPED HERE WHEN COMPILING


    Set poolwin = Pool.Attributes.getNamedItem("PoolType")


    Any help would be greatly appreciated.


    Ta,


    Martin










  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,057
    Location
    Different as in Runner to runner?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •