ShelleyBelly
New Member
- Joined
- Mar 2, 2011
- Messages
- 44
Good Evening All,
I'm using the below code to select .xml files for import. I would like the import dialog box to remember the location of to last file as that is where the subsequent files for import are most likely to be and will therefore stop the user having to hunt through tiers of folders.
The last line of the code throws an error so i'm unsure if the first section is right either.
Any guidance would be much appreciated
Tom
I'm using the below code to select .xml files for import. I would like the import dialog box to remember the location of to last file as that is where the subsequent files for import are most likely to be and will therefore stop the user having to hunt through tiers of folders.
The last line of the code throws an error so i'm unsure if the first section is right either.
Code:
If lastpath = vbNullString Then
ChDir "\"
Else
ChDir lastpath
End If
trackfile = Application.GetOpenFilename("XML Files (*.xml), *.xml", , "Import Track " & TrackNo, , True) 'import ytack1 text
lastpath = trackfile.Path
Any guidance would be much appreciated
Tom