Format user form text box

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,232
Office Version
  1. 2007
Platform
  1. Windows
Hi,
I’m looking for a solution to format a userform text box to & from a worksheet.

When a figure from a worksheet £12.34 is imported to the userform it needs to be shown as 12.34

Likewise when the figure in the userform 12.34 is exported to the worksheet it must show as £12.34

Worksheet cell is formatted as currency but can’t overcome the import side of things for the userform display.

Any advice please.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi,
If your code is returning cell formatting to your textbox it suggest that you are using Range.Text property which returns what you see in the cell rather than its underlying value.

E.g.

Rich (BB code):
Textbox1.Value = Cells(r,c).Text

If you want the value only then in the appropriate part of your code, change Text property shown in RED to Value

Rich (BB code):
Textbox1.Value = Cells(r,c).Value


& see if this resolves your problem.

Dave
 
Upvote 0

Forum statistics

Threads
1,215,467
Messages
6,124,984
Members
449,201
Latest member
Lunzwe73

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