Hello everyone... VB noobie maTT here!
I have a formula in "Private sub frmMain_Load" that I would like to pass throughout some of my other subs.
Every time I try to pass it I get errors.
Any idea why this is happening?
Here is an example of the code I'm using.
FYI...I deleted all the code before the "formula" because none of it worked, So I just commented out the formula and kept working on my program.
I'm using option explicit on and option strict on also.
Excited to see a solution to this! :D
I have a formula in "Private sub frmMain_Load" that I would like to pass throughout some of my other subs.
Every time I try to pass it I get errors.
Any idea why this is happening?
Here is an example of the code I'm using.
FYI...I deleted all the code before the "formula" because none of it worked, So I just commented out the formula and kept working on my program.
I'm using option explicit on and option strict on also.
Code:
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'formula = CInt(CStr((BaseCost + EXTF + IO + EO) * ADJ))
End Sub
Private Sub chkDeck_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkDeck.CheckedChanged
If chkDeck.Checked Then
EXTF = EXTF + Deck
Else
EXTF = EXTF - Deck
'Where I want to call the formula
End If
End Sub