+ Reply to Thread
Results 1 to 5 of 5

Set default data format to "text" instead of "general"

  1. #1
    Registered User
    Join Date
    05-01-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    10

    Set default data format to "text" instead of "general"

    Hello,
    I am currently using VBA code to import multiple .txt and .tab files into excel which bypasses the Import Wizard. Even if I utilize the Import Wizard, I am restricted to one file at a time and have to change each data format field from "general" to "text" which can be very tedious to say the least. I am having another issue with this code importing each header row in the files while I only want one, but will address this in another thread.....As for what I am looking for here.....Simply put..... I would like the following code, or a similar code that does the same thing, to import all fields as "text" not "general".

    Please Login or Register  to view this content.
    Please find attached example of workbook and source file.... Any assistance in this matter will be greatly appreciated..... Regards.... Delta
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Set default data format to "text" instead of "general"

    hi Delta, change this code block:

    Please Login or Register  to view this content.
    to this one:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-01-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Set default data format to "text" instead of "general"

    Hello again watersev... That’s what I wanted....Is it possible to keep one of the header rows from the imports like you were looking at in my other post? Or am I asking too much? If not I can work with this.....Thanks again for you knowledge, time, and effort….. Regards.....Delta

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Set default data format to "text" instead of "general"

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-01-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Set default data format to "text" instead of "general"

    Perfect.....You are awesome watersev......Regards....Delta

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1