Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fixed Width Import (WIN2000-XL97)

    I apologize if this has been asked/answered - just couldn't find it in the archives.

    I am importing a text file to Excel. I use the Import Wizard - Fixed Width.
    Is there a way to save these specs (similar to Access) so when I have another Text file with the same Fixed Width, I don't have to go through the whole process of setting each width?

    Thank you for you repsonses.

    Michael

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fixed Width Import (WIN2000-XL97)

    You could record a macro while doing the process once. Save it in your personal macro workbook.
    Then edit the macro so you can first browse for a file:

    Sub test2()
    Dim vFileName As Variant
    vFileName = Application.GetOpenFilename("All FIles (*.*), *.*", , "Please choose a file", , False)
    If TypeName(vFileName) = "Boolean" Then Exit Sub

    ' your recorded code (replace the hardcoded filename with vFileName)
    End Sub
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fixed Width Import (WIN2000-XL97)

    Outstanding !

    Thank you so much !!

    Michael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •