Calculated Field in Userform

nasa09

New Member
Joined
Oct 3, 2013
Messages
43
I've got a userform that keeps track of fee waivers, and for each different type of fee there are four textboxes: one textbox each for the amount paid and the amount waived (whose values are pulled from separate worksheets), one textbox to identify the officer who waived the fees, and finally one textbox that is intended to sum the values of the paid and waived textboxes.

I've never worked with calculated fields in userforms, so I'm having trouble. Can somebody help me figure out what I'm doing wrong?




Code:
Dim inputRow As Integer
Dim dataRow As Integer
Dim Due As Double

inputRow = ActiveCell.Row
dataRow = inputRow - 5

txtReconPaid.Value = Format(Sheets("Input").Range("L" & inputRow).Value, "#,##0.00")
txtReconWaived.Value = Format(Sheets("Data").Range("X" & dataRow).Value, "#,##0.00")
txtReconIn.Value = Sheets("Data").Range("Z" & dataRow).Value

Due = txtReconPaid.Value + txtReconWaived.Value
txtReconDue.Value = Format(Sheets("Data").Range("W" & dataRow).Value, "#,##0.00")


Any help is greatly appreciated!!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

nasa09

New Member
Joined
Oct 3, 2013
Messages
43
Hi Glenn. Sorry, in my haste I obviously forgot to spell out what was causing me grief.

The calculated fields aren't I calulating...I get a type mismatch error. I was able to solve the problem on my own by using variables instead of direct references, but it still leaves me wondering why it wouldn't work the way I originally wrote it.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,515
Messages
5,832,199
Members
430,115
Latest member
RainerJonker

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
Top