User Form Addition

Guzzlr

Well-known Member
Joined
Apr 20, 2009
Messages
977
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 calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Try
Code:
Tbx_Complete.Value = Format(Tbx_Complete.Value, "0%")
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,843
Members
449,471
Latest member
lachbee

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