Category format of a text box?

mp.

New Member
Joined
Nov 13, 2002
Messages
12
Can anyone help?

Is there any way to apply a category format (ie. currency) to a textbox?

My problem is this,

Using the code below, the cell with the original value in (B4) is formatted to show a currency. When you enter a value, say 100, the currency formatting displays £100.00. But, when you copy the value of the cell to the text box, all formatting is lost and the textbox just show 100.

Workbooks(2).Worksheets(1).Shapes("text box 6").Select
Selection.Characters.Text = Workbooks(1).Worksheets(5).Range("B4")

any ideas?


Thanks.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
mp. said:
Can anyone help?

Is there any way to apply a category format (ie. currency) to a textbox?

My problem is this,

Using the code below, the cell with the original value in (B4) is formatted to show a currency. When you enter a value, say 100, the currency formatting displays £100.00. But, when you copy the value of the cell to the text box, all formatting is lost and the textbox just show 100.

Workbooks(2).Worksheets(1).Shapes("text box 6").Select
Selection.Characters.Text = Workbooks(1).Worksheets(5).Range("B4")

any ideas?


Thanks.

Try this:

Workbooks(2).Worksheets(1).Shapes("text box 6").Select
Selection.Characters.Text = Workbooks(1).Worksheets(5).Range("B4").Text
 
Upvote 0
Thanks for the help!

I tried that but I get an error message, Runtime error '424' - Object required.

I gotta go now, I'll post more details in the morning. Sorry.
 
Upvote 0
The macro works OK before I add the .text part, but having said that, A new worksheet/macro with the new code in works OK as well.

I suspect one of the text boxes is configured wrong?

anyway, I think I can sort it.

Thank you for the help !!!
 
Upvote 0

Forum statistics

Threads
1,221,692
Messages
6,161,334
Members
451,697
Latest member
pedroDH

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