import xml files in succession using Application.FileDialog

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tuxalot
    New Member
    • Feb 2009
    • 200

    import xml files in succession using Application.FileDialog

    I am using Application.Fil eDialog to import (3) xml files. With .AllowMultiSele ct = true, I would like to import these three files in succession (breaks tables otherwise). My For Each statement looks like this:

    Code:
          For Each vrtSelectedItem In .SelectedItems
                    Application.ImportXML _
                            DataSource:=vrtSelectedItem, _
                            ImportOptions:=acAppendData
                Next vrtSelectedItem
    Files are named in succession, like this:

    <user> Import1 - 111710(1).xml
    <user> Import2 - 111710(2).xml
    <user> Import3 - 111710(3).xml

    So "Import1" should import before "Import2", etc.

    Any suggestions?

    Thanks in advance,

    Tux
Working...