+ 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 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    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

  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)

Similar Threads

  1. [SOLVED] Text Box After press enter i want to select all text of a textbox (userform)
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2017, 01:19 AM
  2. select multiple text instances to conditionally format a row
    By CHRISCOUCK in forum Outlook Formatting & Functions
    Replies: 8
    Last Post: 08-14-2015, 07:25 AM
  3. [SOLVED] How to find text then select RANGE form the text found to lastrow of Column J
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2014, 02:45 AM
  4. Select and format to end of row
    By ashleykelley in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-07-2007, 01:16 AM
  5. Select & Delete text in TextBox1 also deletes text in TextBox2
    By heinousanus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2006, 08:02 PM
  6. Select a Range and Format
    By Jaina WIlliams in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2005, 04:06 PM
  7. [SOLVED] format first row within select
    By Jackie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2005, 08: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