ActiveX Input Format as currency with 2dp

JonReyno

Board Regular
Joined
Jun 8, 2009
Messages
130
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I have been trawling the web and Mr Excel for an answer, but everything I have tried doesn't work. I am creating a userform that users need to be able to add in monetary values. Below is how I have the textbox set up at the moment, but it's not doing what I want:

VBA Code:
Private Sub TextBox18_Change()
    TextBox18.Value = Format(TextBox18.Value, "###,##")
End Sub

If I wanted to enter the value 1,234.56 into the cell I can't. It will give me 1,234 but doesn't all the .56. So I have tried different variations on it, commonly "###,##0.00" but that keep giving me 1.00 as a result.

Does anyone have a stroke of genius that will help me out? I don't mind if the filed has £ at the front or not. Currently I have that outside the box, but it can be part of the solution if needs be.
 
That's OK, I appreciate your help. I have just muddled something together and didn't really think about making it into a proper form. Lessons learnt for next time. If there isn't a way to change it, then it'll have to stay as it is. I've put too much work in to unpick it now.
 
Upvote 0

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,223,632
Messages
6,173,469
Members
452,516
Latest member
archcalx

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