Consulting

Results 1 to 4 of 4

Thread: go to start position of selection

  1. #1
    VBAX Mentor
    Joined
    Jan 2006
    Posts
    348
    Location

    go to start position of selection

    [VBA]Lets say
    start1=selection.start
    if start1 > selection.end then
    I would like to put my cursor in position of start1 [/VBA]

    or other solution is "how can I loop until comment is found"

    thnx

  2. #2
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    ?

    Well, I assumed start1 is the first cell of your selection and selection.end is the last cell of your selection.
    So I thought you're trying to determine if the value of the first cell is bigger than the value of the last cell.
    Then I lost myself...what's the relation with comments???
    ALe
    Help indigent families: www.bancomadreteresa.org

  3. #3
    VBAX Mentor
    Joined
    Jan 2006
    Posts
    348
    Location
    Sorry about that this is word document
    Well I have comment in same position as start1 but somehow I dont know how to loop throught the text until it reaches the comment or start1

  4. #4
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    1. Hmmmm. [vba]start1=selection.start
    If start1 > selection.end[/vba]I have never heard of a situation where the Selection.Start is greater than the Selection.End. If it was greater than....would that not mean the Start came after the End...in which case, hmmmm, it would not be the Start...now would it?

    Can you please carefully state what you are doing?

    start1 appears to be Selection.Start. OK. That means you have the Selection at Point X...whatever that is.

    What has this got to do with looping through text????

Posting Permissions

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