BlackAlnet Posted August 5, 2009 Posted August 5, 2009 How can i take the name of .txt file, in a multiselection? i have done this: Dim lngCount As Long ' Open the file dialog With Application.FileDialog(msoFileDialogOpen)'.AllowMultiSelect = True .Show ' Display paths of each file selected For lngCount = 1 To .SelectedItems.Count 'MsgBox .SelectedItems(lngCount) Next lngCount after that, use data extract on .txt, and process the informations, but i need the name of each .txt file For the name of .txt file, i have to take the files again, with that code: Dim txtname As String txtname = Application.GetOpenFilename("text files (*.txt), *.txt,") I don't wanna take each .txt file, i want to take only in the first selection, and record the name in a new variable This is a vba for excel, but is a complement of my lisp... I will be very grateful with any help!! Quote
ollie Posted August 7, 2009 Posted August 7, 2009 What do you mean by first selection? I am assuming that you mean from a drop down box or a similar form object. If that is the case you will be able to determine the order of the items in the box by iterating through the list. Compare the selected item list against the contents of the form object. Does this need to be a multi selection if you are only using the first txt file? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.