Change format of userform textbox to currency

jeff2813

New Member
Joined
Jul 17, 2019
Messages
30
Hi there, I have a userform with 4 textboxes that when text is entered they all refer back to individual cells. All data entered on a spreadsheet goes to the userform and when entered into the userform goes back to the spreadsheet. One of the textboxes displays a price but i cant seem to change the format to a currency from numerical. is there a way to change the format like a excel cell or do i need a specific code to achieve this? Thank you
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Maybe something like
Code:
Me.TextBox1.Value = "123.45"
Me.TextBox1.Value = Format(Me.TextBox1.Value, "[COLOR=#ff0000]£#,##0.00[/COLOR]")
change part in red to suit
 
Upvote 0
Well thank you for your time but i cant seem to get it to work. Probably just me as im pretty new at this.
 
Upvote 0
Are you entering data into the textbox, or just pulling data from the sheet?
 
Upvote 0
As an example. When i press a1 and that cell has 25$ in it as currency, a userform pops up with 25 in it but it has no currency ex $25.00. I can also press $30 in the userform textbox but when goes back to A1 it comes back as a correction that tells me its text and would i like to put it in a a number. They need a built in currency box as well as textbox, life would be easier.
 
Upvote 0
Can you post the code that you are using?
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,941
Members
452,539
Latest member
delvey

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