How to call the TextImportWizard?

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hi

Is it possible to call the TextImportWizard with vba? If yes, how to do?

Tom
 
I think you could open a text file and import it to only column A. Then show
that dialog.

Option Explicit
Sub testme()

Dim myFileName As Variant

myFileName = Application.GetOpenFilename("Text files, *.txt")

If myFileName = False Then
Exit Sub
End If

Workbooks.Open Filename:=myFileName

Range("a:a").Select
Application.Dialogs(xlDialogTextToColumns).Show

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top