User Form Addition

Guzzlr

Well-known Member
Joined
Apr 20, 2009
Messages
982
Office Version
  1. 2021
Platform
  1. Windows
Hello All
Code:
Private Sub Btn_Find_Budget_Click()
On Error GoTo Error_Handler

If (Tbx_REV = vbNullString) Or (Tbx_Actual = vbNullString) Then
    MsgBox ("To Compute Budget:" _
    & vbNewLine & "REV & Actual fields require an input")
    Exit Sub
End If
Tbx_Budget = (Tbx_REV + Tbx_Actual)
Error_Handler:
MsgBox "Test"

I'm not understanding something here...
I have:
Tbx_Actual = (Tbx_Budget - Tbx_REV)

&

Tbx_Budget = (Tbx_REV + Tbx_Actual)

The subtraction in the Tbx_Actual works correctly. However, the Tbx_Budget combines the two numbers instead of summing them.
If I have Tbx_REV = 2 and I have Tbx_Actual =4. The output in Tbx_Budget = 24, instead of 6.

Why is this? How do I sum Tbx_REV and Tbx_Actual?

Thanks for the help
excel 2013
 
Last edited:
Code:
Tbx_Complete.Value = Val(Tbx_Actual.Value) / Val(Tbx_Budget.Value)
Style = "Percent"

One more question. I'm trying to have Tbx_Complete.Value as a percentage answer, instead of simply multiplying the whole thing by 100

Thanks
 
Last edited:
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Try
Code:
Tbx_Complete.Value = Format(Tbx_Complete.Value, "0%")
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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