jacobrcotton
Board Regular
- Joined
- Jan 28, 2017
- Messages
- 51
Hello,
I've created a data input userform (really, a series of userforms) in which end users will input data, many of which are dollar values, sometimes as a high as the tens of millions of dollars. Most users of the form will input the value of $10,432,765 as "10432765", which for me, is fine. However, for ease of checking the numbers by their supervisors/peers/whatever, I would like that number to always be formatted as "###,###,##0". Again, this is fairly easy. I'm using the code below:
However, there are a lot of these inputs and the format code I have above is specifically formatting the OperatingCashflows textbox. So for each textbox, that code needs to be copied and updated individually for each textbox. I'm looking to avoid wasting time by monotonously having to copy/paste hundreds of times.
What I'm hoping for is an easier way, and my vision is something like this code:
***NOT A FUNCTIONING CODE***
Any thoughts here?
Thanks in advance.
-jacob
I've created a data input userform (really, a series of userforms) in which end users will input data, many of which are dollar values, sometimes as a high as the tens of millions of dollars. Most users of the form will input the value of $10,432,765 as "10432765", which for me, is fine. However, for ease of checking the numbers by their supervisors/peers/whatever, I would like that number to always be formatted as "###,###,##0". Again, this is fairly easy. I'm using the code below:
Code:
Private Sub OperatingCashflows_AfterUpdate()
IsNumericTest OperatingCashflows
NotLessThanZeroTest OperatingCashflows
OperatingCashflows = Format(OperatingCashflows.Value, "###,###,##0")
End Sub
However, there are a lot of these inputs and the format code I have above is specifically formatting the OperatingCashflows textbox. So for each textbox, that code needs to be copied and updated individually for each textbox. I'm looking to avoid wasting time by monotonously having to copy/paste hundreds of times.
What I'm hoping for is an easier way, and my vision is something like this code:
***NOT A FUNCTIONING CODE***
Code:
Private Sub OperatingCashflows_AfterUpdate()
IsNumericTest Me
NotLessThanZeroTest Me
Me = Format(Me.Value, "###,###,##0")
End Sub
Any thoughts here?
Thanks in advance.
-jacob