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
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