+ Reply to Thread
Results 1 to 2 of 2

InStr - searching between commas

  1. #1
    Registered User
    Join Date
    07-13-2014
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2010
    Posts
    7

    InStr - searching between commas

    Hi

    I have created a Userform in Word, which in addition to updating various DocVariables, I would also like to copy those variables to the "Comments" section of Properties in order that the next time the Userform is accessed, it can recall what was input to those DocVariables in the past.

    I've managed to do this for one DocVariable by using ActiveDocument.BuiltInDocumentProperties("Comments") and then setting an Integer and using a comma as a delimiter to find the Integer - 1 and display the result.

    What I can't work out how to do is to have the InString find the space between the second and third commas and then display the value between them (which would refer to the second DocVariable in the document).

    Sorry if I'm not explaining this very well - I'm not really sure how the process works and most of what I've done has been cobbled together from other posts I've been able to find.

    Any help that anyone is willing to offer would be gratefully received.

    Thanks

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,910

    Re: InStr - searching between commas

    Try it like this

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

+ 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. Replies: 5
    Last Post: 01-17-2014, 05:56 PM
  2. [SOLVED] VBA InStr OR
    By hobbiton73 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2013, 02:26 PM
  3. Searching through strings with commas
    By jarochnrol in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2011, 02:06 PM
  4. Problems searching Excel cells for InStr text comparison, cant get cell values ...
    By BaLLZaCH in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-27-2008, 05:52 AM
  5. [SOLVED] InStr
    By FGM in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2005, 04:05 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