Userform not adding Running Balance in new Table Row

dwt77

New Member
Joined
Feb 2, 2021
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I have a budget spreadsheet that has a user form that adds my categories and amounts to another my Expense Sheet. Everything works except my running balance. It will not add the formula to the new balance column to calculate the balance. I am new to all of this but have tried numerous solutions. Do I need to fix this in the macro, userform code or is something wrong with my running balance formula? Thanks in advance

Userform Code

Option Explicit
Private Sub ExpCancelBtn_Click()
AddExpForm.Hide
Unload AddExpForm
End Sub

Private Sub ExpOkBtn_Click()
'Check For Required Fields
If ExpDate.Value = Empty Or ExpAmnt.Value = Empty Or ExpCateg.Value = Empty Then
MsgBox "Please make sure to fill in all fields before saving"
Exit Sub
End If

Dim ExpRow As Long
ExpRow = Sheet2.Range("A99999").End(xlUp).Row + 1 'First Avail. Row
Sheet2.Range("A" & ExpRow).Value = ExpDate.Value 'Expense Date
Sheet2.Range("D" & ExpRow).Value = ExpDescrip.Value 'Description
Sheet2.Range("E" & ExpRow).Value = ExpCateg.Value 'Category
Sheet2.Range("F" & ExpRow).Value = ExpAmnt.Value 'Amount
AddExpForm.Hide
Unload AddExpForm

End Sub

Private Sub UserForm_Activate()
ExpCateg.RowSource = "Categories"
ExpDate.Value = Format(Date, "mm/dd/yyyy")
ExpAmnt.SetFocus
End Sub
 

Attachments

  • Example.png
    Example.png
    99.3 KB · Views: 16
  • running balance.png
    running balance.png
    83.6 KB · Views: 17
  • UseForm Code.png
    UseForm Code.png
    179.2 KB · Views: 17
  • UseForm.png
    UseForm.png
    139.2 KB · Views: 16

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

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