+ Reply to Thread
Results 1 to 5 of 5

Extract small string of text from larger string

  1. #1
    Registered User
    Join Date
    06-12-2008
    Posts
    11

    Extract small string of text from larger string

    I’m working on a bit of code that I want to extract a small piece of text form a larger text file.

    At the moment I can open and read the entire text file and also pin point a start and end marker of the text I want to extract.

    What I’m having trouble doing is creating a variable text string which contains the text between the 2 markers.

    What I have so far is

    Please Login or Register  to view this content.
    Last edited by mark_jam3s; 09-23-2010 at 05:34 AM.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Extract small string of text from larger string

    If it's not a calculation do not use a function but a sub.

    Please Login or Register  to view this content.
    In a function
    Please Login or Register  to view this content.
    Last edited by snb; 09-22-2010 at 10:38 AM.



  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Extract small string of text from larger string

    Please Login or Register  to view this content.
    Note: it's very misleading to have integer variables whose names start with 'str'!
    Remember what the dormouse said
    Feed your head

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Extract small string of text from larger string

    @snb,
    I think you are missing a quote at the start of the msgbox title string.

  5. #5
    Registered User
    Join Date
    06-12-2008
    Posts
    11

    Re: Extract small string of text from larger string

    Thank you both for your replies!

    I'll will post my code once I've finished tidying it up

+ 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