Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

VS 2010 How to pass a formula from Private Sub frm_load

$
0
0
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.

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

Excited to see a solution to this! :D

Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>