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.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,215,619
Messages
6,125,871
Members
449,267
Latest member
ajaykosuri

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