Dim a, b, c As Single
Private Sub Form_Load ()
Text1. Text=""
Text2. Text=""
A=Val (Text1. Text)
B=Val (Text2. Text)
End Sub
Private Sub T01 ()
C=a + b
End Sub
Private Sub Command1_Click ()
Call T01
Text3. Text=c
End Sub
CodePudding user response:
What the situation? What are your expectations?CodePudding user response:
Try to the following function, Form_Load () for a, b value assignment code,Private Sub T01 ()
A=Val (Text1. Text)
B=Val (Text2. Text)
C=a + b
End Sub
CodePudding user response: