Hopefully someone can tell me what's wrong with this line of code and how to correct it.<br>
..<br>
Sub cmdCompute_Click() <br>
Format (RT1, "###00.00"
=(.049*V)/((Sa*a125)+(Sa*b125)+(Sa*c125)+(Sa*d125)+(Sa*e125)<br>
lblRT1.Caption = RT1<br>
End Sub<br>
..<br>
All variables (RT1, V, Sa, a125, etc.) are declared as double and values are based on user input.<br>
I am trying to get the result of this equation to display in a label box, lblRT1.<br>
When I run the program, a run-time error type 6 is displayed...so I click on debug and this is the line that's highlited. At first I thought it was just because the result was too big a decimal and that the "Format...." was supposed to care for that. But, alas, I am still getting the same error message.<br>
Any help would be GREATLY appreciated.<br>
(by the way, James, thank you for your help with my last question!)
..<br>
Sub cmdCompute_Click() <br>
Format (RT1, "###00.00"
lblRT1.Caption = RT1<br>
End Sub<br>
..<br>
All variables (RT1, V, Sa, a125, etc.) are declared as double and values are based on user input.<br>
I am trying to get the result of this equation to display in a label box, lblRT1.<br>
When I run the program, a run-time error type 6 is displayed...so I click on debug and this is the line that's highlited. At first I thought it was just because the result was too big a decimal and that the "Format...." was supposed to care for that. But, alas, I am still getting the same error message.<br>
Any help would be GREATLY appreciated.<br>
(by the way, James, thank you for your help with my last question!)