Is there any way I can shorten this code into a for statement?
If Not IsNull(DOLLAR_1) Then tmp = tmp + DOLLAR_1
If Not IsNull(DOLLAR_2) Then tmp = tmp + DOLLAR_2
If Not IsNull(DOLLAR_3) Then tmp = tmp + DOLLAR_3
If Not IsNull(DOLLAR_4) Then tmp = tmp + DOLLAR_4
If Not IsNull(DOLLAR_5) Then tmp = tmp + DOLLAR_5
If Not IsNull(DOLLAR_6) Then tmp = tmp + DOLLAR_6
If Not IsNull(DOLLAR_7) Then tmp = tmp + DOLLAR_7
If Not IsNull(DOLLAR_8) Then tmp = tmp + DOLLAR_8
If Not IsNull(DOLLAR_9) Then tmp = tmp + DOLLAR_9
If Not IsNull(DOLLAR_10) Then tmp = tmp + DOLLAR_10
dollar_* are textboxes
tmp is a variable that stores all of the dollar_* that have a value.
If Not IsNull(DOLLAR_1) Then tmp = tmp + DOLLAR_1
If Not IsNull(DOLLAR_2) Then tmp = tmp + DOLLAR_2
If Not IsNull(DOLLAR_3) Then tmp = tmp + DOLLAR_3
If Not IsNull(DOLLAR_4) Then tmp = tmp + DOLLAR_4
If Not IsNull(DOLLAR_5) Then tmp = tmp + DOLLAR_5
If Not IsNull(DOLLAR_6) Then tmp = tmp + DOLLAR_6
If Not IsNull(DOLLAR_7) Then tmp = tmp + DOLLAR_7
If Not IsNull(DOLLAR_8) Then tmp = tmp + DOLLAR_8
If Not IsNull(DOLLAR_9) Then tmp = tmp + DOLLAR_9
If Not IsNull(DOLLAR_10) Then tmp = tmp + DOLLAR_10
dollar_* are textboxes
tmp is a variable that stores all of the dollar_* that have a value.