+ Reply to Thread
Results 1 to 3 of 3

Load text file into an array

  1. #1
    Registered User
    Join Date
    04-03-2019
    Location
    Nigeria
    MS-Off Ver
    2013
    Posts
    60

    Load text file into an array

    How can i load a text file into an array.
    Then, use a function to search for a text string.
    e.g.
    text search = "he came here"
    the words in a text file are "he was here yesterday when i came".
    So, I need a function that will return true when each of the words in the text search is found completely inside the text file
    Last edited by yinkajewole; 08-01-2019 at 04:08 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Load text file into an array

    Hello yinkajewole,

    This macro will return True if all of the search words are found in the text file. Case is ignored. You can interrupt the macro at anytime using the keys Ctrl+Break.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    04-03-2019
    Location
    Nigeria
    MS-Off Ver
    2013
    Posts
    60

    Re: Load text file into an array

    Good one! Thanks

+ 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] Open/Load TEXT file with Specific Date and start at specific Cell
    By chergian in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-09-2017, 09:29 AM
  2. Load Values To Array Using .CurrentRegion With Array Base 0
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2016, 07:53 AM
  3. [SOLVED] Load data from text file - needed fileds in VB
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2016, 02:45 PM
  4. Load an array from ADO recorset
    By cgkmal in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-18-2014, 04:07 PM
  5. 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
  6. 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
  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