Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,075
- Office Version
- 2019
- Platform
- Windows
I have numerous textboxes that use the code below in their respective change event. In the effort to reduce redundancy, is it possible to have just one code and call the code in each textbox change event?
VBA Code:
Select Case Len(tbEq)
Case 1
tbEq = Format(tbEq, "$0\.00")
Case Is > 1
v = Replace(tbEq, "$", "")
v = Replace(v, ".", "")
tbEq = Format(v / 100, "$#,#0.00")
Case Else
End Select