Option Explicit
Private Sub Command1_Click()
Dim no1 As Integer
Dim no2 As Integer
Dim r1 As Integer, r2 As Integer, sum As Integer
no1 = Val(Text1.Text)
no2 = Val(Text2.Text)
While no1 Or no2
r1 = no1 Mod 10
r2 = no2 Mod 10
prod = r1 * r2
sum = sum + prod
no1 = no1 \ 10
no2 = no2 \ 10
Wend
Print "Sum of Product is "; sum
End Sub