+ Reply to Thread
Results 1 to 5 of 5

trouble finding object to use

Hybrid View

  1. #1
    Wazooli
    Guest

    trouble finding object to use

    Which object controls the ability to type in either the formula bar or
    directly in a cell? Specifically, how can I get the text selection so I can
    superscript or subscript it? As an example, instead of H2O, I would like the
    2 to be subscripted. I know how to do this via format cells, but I would
    like to do it in code so I can assign a toolbar button to it.

    wazooli

  2. #2
    Tom Ogilvy
    Guest

    Re: trouble finding object to use


    Macros don't run when you are in Edit mode. At least not in anyway that
    they can be used to subscript the current character you are entering.

    Whether you can enter a formula directly in a cell is controlled in
    Tools=>Options=>Edit tab.

    --
    Regards,
    Tom Ogilvy



    "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    news:3CD06305-98E0-47F7-9569-4223791EFB4A@microsoft.com...
    > Which object controls the ability to type in either the formula bar or
    > directly in a cell? Specifically, how can I get the text selection so I

    can
    > superscript or subscript it? As an example, instead of H2O, I would like

    the
    > 2 to be subscripted. I know how to do this via format cells, but I would
    > like to do it in code so I can assign a toolbar button to it.
    >
    > wazooli




  3. #3
    Wazooli
    Guest

    Re: trouble finding object to use

    Right, I got all of that. Basically, lets say I am typing along, and as part
    of what I am typing, the characters I enter are "dH2O". I want a sub that
    will find the string "dH2O", and subscript the 2. If this could happen while
    I was typing, all the better. I realize that all I would really have to do
    is go back over the 2 after I have finished typing, go to 'format cells...',
    and change the selected text to subscript, but hey - it's a learning process
    for me, and a matter of curiousity to see how it's done.

    wazooli

    "Tom Ogilvy" wrote:

    >
    > Macros don't run when you are in Edit mode. At least not in anyway that
    > they can be used to subscript the current character you are entering.
    >
    > Whether you can enter a formula directly in a cell is controlled in
    > Tools=>Options=>Edit tab.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    > "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    > news:3CD06305-98E0-47F7-9569-4223791EFB4A@microsoft.com...
    > > Which object controls the ability to type in either the formula bar or
    > > directly in a cell? Specifically, how can I get the text selection so I

    > can
    > > superscript or subscript it? As an example, instead of H2O, I would like

    > the
    > > 2 to be subscripted. I know how to do this via format cells, but I would
    > > like to do it in code so I can assign a toolbar button to it.
    > >
    > > wazooli

    >
    >
    >


  4. #4
    Wazooli
    Guest

    Re: trouble finding object to use

    Actually, maybe I'm being to difficult about this. What I really want is to
    replicate the subscript button from Word. That way, I can subscript whatever
    text might be selected in the cell. Does that make it clearer?

    "Tom Ogilvy" wrote:

    >
    > Macros don't run when you are in Edit mode. At least not in anyway that
    > they can be used to subscript the current character you are entering.
    >
    > Whether you can enter a formula directly in a cell is controlled in
    > Tools=>Options=>Edit tab.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    > "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    > news:3CD06305-98E0-47F7-9569-4223791EFB4A@microsoft.com...
    > > Which object controls the ability to type in either the formula bar or
    > > directly in a cell? Specifically, how can I get the text selection so I

    > can
    > > superscript or subscript it? As an example, instead of H2O, I would like

    > the
    > > 2 to be subscripted. I know how to do this via format cells, but I would
    > > like to do it in code so I can assign a toolbar button to it.
    > >
    > > wazooli

    >
    >
    >


  5. #5
    Tom Ogilvy
    Guest

    Re: trouble finding object to use

    You do rich text formatting with the Characters object.

    You can turn on the macro recorder and then do it manually. This will give
    you the basic code you need.

    --
    Regards,
    Tom Ogilvy

    "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    news:CEC2FEFC-AF90-4094-8150-80FFDCBC2501@microsoft.com...
    > Actually, maybe I'm being to difficult about this. What I really want is

    to
    > replicate the subscript button from Word. That way, I can subscript

    whatever
    > text might be selected in the cell. Does that make it clearer?
    >
    > "Tom Ogilvy" wrote:
    >
    > >
    > > Macros don't run when you are in Edit mode. At least not in anyway that
    > > they can be used to subscript the current character you are entering.
    > >
    > > Whether you can enter a formula directly in a cell is controlled in
    > > Tools=>Options=>Edit tab.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > >
    > > "Wazooli" <Wazooli@discussions.microsoft.com> wrote in message
    > > news:3CD06305-98E0-47F7-9569-4223791EFB4A@microsoft.com...
    > > > Which object controls the ability to type in either the formula bar or
    > > > directly in a cell? Specifically, how can I get the text selection so

    I
    > > can
    > > > superscript or subscript it? As an example, instead of H2O, I would

    like
    > > the
    > > > 2 to be subscripted. I know how to do this via format cells, but I

    would
    > > > like to do it in code so I can assign a toolbar button to it.
    > > >
    > > > wazooli

    > >
    > >
    > >




+ 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