Importing XML

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All

I have to write some code to import a xml file, which is fine. but the
problem i am having is the filename that get sent to me changes. it will
always be data2*******.xml

the stars represent differnet digits, hop can i code this as it will run
every 20 mins and would be a pain to do manually each time

thanks for all your help
 
Try something like this:

Dim strFileName As String

strFileName = Dir("data2???????.xml")
If Len(strFileName) > 0 Then
Application.ImportXML strFileName ...
End If
 
Back
Top