confronta1 vba excel powerpoint
esci con testvba.htm
pro2.xls
somma due numeri assegnati da codice
con solo excel, excel +
vba, powerpoint + vba
Option Explicit
Private Sub CommandButton1_Click()
'esevba1
'somma due interi assegnati
Dim a, b, somma As Integer
Cells(3, 1) = "a="
Cells(4, 1) = "b="
Cells(5, 1) = "somma="
Cells(3, 2) = 10
Cells(4, 2) = 20
somma = Cells(3, 2) + Cells(4, 2)
Cells(5, 2) = somma
End Sub
Option Explicit
Private Sub CommandButton1_Click()
'pro21
'somma due interi assegnati
Dim a, b, somma As Integer
Label1.Caption = "a="
Label2.Caption = "b="
Label3.Caption = "somma="
Label4.Caption = 10
Label5.Caption = 20
somma = Val(Label4) + Val(Label5)
Label6.Caption = somma
End Sub
Private Sub UserForm_Click()
End Sub