+ Reply to Thread
Results 1 to 3 of 3

Select/format row in text box

  1. #1
    Registered User
    Join Date
    11-30-2018
    Location
    Cambridge
    MS-Off Ver
    Microsoft Office 365
    Posts
    2

    Select/format row in text box

    Hi, I'm trying to make a VBA script with which you can format one specific row/paragraph in a text box. I would like to be able to select the row by putting the cursor on the relevant line.

    Using the below code, I am able to do that, except that it doesn't work if the cursor is on the beginning or the end of a line.

    Please Login or Register  to view this content.
    What's the best way of making this work also for the beginning or end of a line? Is there a way of referring to the row you're on, or can one extend the selection like in word?

    Edit: I played around some more, I think my current version only formats the word I'm currently on, not the line. Help still needed.

    Cheers
    Last edited by Rosten; 11-30-2018 at 12:33 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    45,720

    Re: Select/format row in text box

    Hi, welcome to the forum

    Is this an excel question or powerpoint?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

    STOP PRESS: Forum Rules Updated September 2018! Please read them here.

  3. #3
    Registered User
    Join Date
    11-30-2018
    Location
    Cambridge
    MS-Off Ver
    Microsoft Office 365
    Posts
    2

    Re: Select/format row in text box

    Quote Originally Posted by FDibbins View Post
    Hi, welcome to the forum

    Is this an excel question or powerpoint?
    Hi, thank you!

    This is for Power Point, specifically for textboxes in PP (I'm guessing shapes would work the same way).

    I want to make a table-of-contents slide describing the sections of the presentation. A copy of this slide is then to be placed at the beginning of each section with the current section highlighted. I want to use the macro to quickly highlight the row in the table-of-contents textbox that corresponds to the current section.

+ 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