My UserForm fills a row of a worksheet with values.
The code returns calculated values back to some of the UserForm TextBoxes.
So, with this…<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
<o></o>
<o></o>
How do I get TextBox32.Value to display as currency???
Example: If WS.Cells(iRow, 32).Value is 400...TextBox32 will be displayed as $100.00
The code returns calculated values back to some of the UserForm TextBoxes.
So, with this…<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
Code:
[FONT=Verdana][SIZE=1]Private Sub TextBox21_AfterUpdate()<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]Dim iRow As Long<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]Dim WS As Worksheet<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]Set WS = Worksheets("Sheet2")<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]iRow = WS.Cells(Rows.Count, 1) _<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1].End(xlUp).Offset(0, 0).Row<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]WS.Cells(iRow, 21).Value = TextBox21.Value<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]WS.Cells(iRow, 32) = WS.Cells(iRow, 21).Value[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1][B]TextBox32.Value = WS.Cells(iRow, 32).Value * 0.25[/B]<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]End Sub<o:p></o:p>[/SIZE][/FONT]
<o></o>
How do I get TextBox32.Value to display as currency???
Example: If WS.Cells(iRow, 32).Value is 400...TextBox32 will be displayed as $100.00