Activex Text Box - Loss of formatting in Print Preview

Tucker1991

New Member
Joined
Nov 28, 2011
Messages
1
Hi everyone,

I'm hoping to gain some insight on the following issue:

I'm using the following VBA to format values to percentages in an activex text box:

Code:
TB.Value = Format(TB.Value, "+#0.0# %;-#0.0# %")

This works great, however, when using print preview through VBA, this formatting is lost and the text box reverts to displaying the value in the "General" format.

I need to keep this text box formatting for when the worksheets are viewed in print preview and subsequently printed. Does anyone know of a solution or a work around for this problem?

Also, if it's important, the text box is linked via properties to a cell on another worksheet, users will not be entering values directly.

Many thanks for your time and responses.
 

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Watch MrExcel Video

Forum statistics

Threads
1,122,820
Messages
5,598,297
Members
414,224
Latest member
Crazy_FC

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
Top