Private Sub cmdBtnCalc_Click() Call CalculateValue End Sub Private Sub CalculateValue Dim Num1 as Integer Set Num1 = 2 Dim Num2 as Integer Set Num2 = 6 Set frmTest.TBCalcValue.Text = Num1 * Num2 End Sub
Private Sub cmdBtnCalc_Click() Dim Num1 as Integer Set Num1 = 2 Dim Num2 as Integer Set Num2 = 6 frmTest.TBCalcValue.Text = CalculateValue (Num1, Num2) End Sub Private Function CalculateValue (ByVal Num1 as Integer, ByVal Num2 as Integer) as Integer CalculateValue = Num1 * Num2 End Function
Private Sub cmdBtn_Click() Call Sub1 Call Sub2 Call Sub3 End Sub
Private Function Pythagorean(ByVal intA As Integer, ByVal intB As Integer) As Double Dim answer As Double answer = (intA ^ 2) + (intB ^ 2) Pythagorean = answer End Function
Private Sub PythTheory Dim A as Integer Dim B as Integer Dim C as Integer Set A = 2 Set B = 3 ' This is where you call the function to calculate C (from above) Set C = Pythagorean(A, ' so you pass the function 2 and 3 and it will return the sum of the squares. End Sub
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.