chiamata di funzione
uso di funzione con dati prefissati o da inserire
vedi formato14.xls
Option Explicit
Private Sub CommandButton1_Click()
Rem formato14
Rem uso di funzione con dati prefissati o da inserire
Dim a As Integer
Dim b As Integer
Dim x As Integer
Dim y As Integer
a = 10
b = 20
Cells(1, 1) = esegue(a, b)
x = TextBox1
y = TextBox2
Cells(1, 4) = esegue(x, y)
End Sub
Public Function esegue(a
As Integer, b As Integer)
Dim somma As Integer
somma = a + b
esegue = somma
End Function
Private Sub commandbutton2_Click()
Cells(1, 1) = ""
TextBox1 = ""
TextBox2 = ""
Cells(1, 4) = ""
End Sub