Macro to input symbol in text box?

grimlock

New Member
Joined
Mar 9, 2009
Messages
39
I'm trying to create a macro to enter a symbol in a text box at the cursor location. Excel doesn't seem to be set up to record text box input.

Font: Calibri
Subset: General Punctuation
Character code: 2022
from: Unicode (hex)

Its a bullet symbol. (trying to avoid using the bullet tool in excel). This is for a multi-user form.

Thanks for any ideas.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Scratch that...you wanted it inside of a text box...

If you have the textbox selected, try this:

Code:
    ActiveSheet.Shapes("Text Box 1").Select
    Selection.Characters.Text = "•" & Selection.Characters.Text

This will add the little character infront of what ever is in the box. Or you can delete the & Selection.Characters.Text and it will simply overwrite anything in the box..

Hope this is what you are looking for.

-JSA
 
Upvote 0
Thanks for the reply JSA715,

Your code worked, but for some reason it places the bullet at the top of the text box and removes any font settings such as justification/bold/italic. All text in the text box shifts to the left, any numbering is eliminated as well.

I placed the code with the worksheet and triggered it with a button, I wonder if I should trigger it some other way, maybe clicking outside to the button is why it lost the cursors position and inserted the symbol at the top. I'll do some experimenting.

Thanks for trying.
 
Upvote 0

Forum statistics

Threads
1,213,514
Messages
6,114,078
Members
448,547
Latest member
arndtea

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top