+ Reply to Thread
Results 1 to 4 of 4

macro: use selected characters

  1. #1
    Registered User
    Join Date
    05-28-2008
    Posts
    13

    macro: use selected characters

    I want to create a macro that will allow me to highlight characters in a cell, then do the equivalent of:
    Format > Font> Superscript

    Here is my macro:

    Please Login or Register  to view this content.
    But it doesn't like the With Selection (i get an error). how can I get it to do the operation on the selected characters?
    Thanks.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Look up the Characters property in VBA Help:
    Please Login or Register  to view this content.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431
    Not sure this is possible.
    With the cell active, so you can select the characters, you can not execute code.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    05-28-2008
    Posts
    13
    It looks like Andy's correct.

    I used the suggestion from shg, and got a macro to work that superscripts the entire cell, but the inability to run a macro with the characters selected seems to be a deal-breaker

+ 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