public function igen
Jeg troede lige, at jeg havde forstået denne rutine, men ved et tjek gik det galt.Hvorfor får jeg 111 og ikke summen 3 i nedenstående kode?
Private Sub Command4_Click()
Dim tal1
Dim tal2
Dim tal3
tal1 = InputBox("skriv et tal")
tal2 = InputBox("skriv et tal")
tal3 = InputBox("skriv et tal")
MsgBox "Tallet er" & addition(tal1, tal2, tal3)
End Sub
Public Function addition(tal1, tal2, tal3)
addition = tal1 + tal2 + tal3
End Function
