+ Reply to Thread
Results 1 to 3 of 3

Load data from text file - needed fileds in VB

  1. #1
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Cool Load data from text file - needed fileds in VB

    Trying to simply import the contents of a csv file that is 64 rows by 7 columns and wanted to save some room in the editor. Below is what the macro recorder recorded and then I tweaked a 2nd and 3rd rows a bit. Can I simply delete the commands with " = False" next to them? Also, what does ".TextFilePlatform = 437" do?

    Please Login or Register  to view this content.

    Thanks
    You either quit or become really good at it. There are no other choices.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Load data from text file - needed fileds in VB

    Hi,

    .TextFilePlatform determines the Source of the Data (Windows=2, MS-DOS=3, Macintosh=1)
    See https://msdn.microsoft.com/en-us/lib.../ff196091.aspx

    Other numbers are apparently IBM-PC = 437, and Unicode=65000 which are 'Unicode Code Page Identifiers'.
    See https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx

    And for more than you will ever want to know there is Wikipedia:
    https://en.wikipedia.org/wiki/Code_page

    I too am of the minimalist school. However, the days of saving bits and bytes are long gone, when I had to fit ten pounds of code into a five pound bag of ram. I gave up preening unnecessary Macro Recorder generated code a long time ago, unless I was positive I was not going to do something bad. I know it is against your nature, but it is difficult to swim upstream.

    Lewis

  3. #3
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: Load data from text file - needed fileds in VB

    Hi Lewis,

    Thanks for your feedback - very helpful information.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] ListBox in a Userform to load data from external XML file
    By powerplug in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-22-2015, 01:56 PM
  2. [SOLVED] Export specific range to text file and import the text file if needed
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-06-2015, 07:38 AM
  3. Macro to load text file not working.
    By calvinle in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-20-2014, 11:05 PM
  4. VBA Importing Text File makes the file longer to load everytime
    By Hudas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2014, 11:26 AM
  5. Replies: 3
    Last Post: 05-14-2010, 01:03 AM
  6. Damage to .xls file upon data load
    By ejLep in forum Excel General
    Replies: 1
    Last Post: 04-28-2006, 04:30 PM
  7. Replies: 0
    Last Post: 04-18-2005, 09:06 PM

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