.
.
Paste this code in your UserForm for the CommandButton.
This example presumes two numbers, one in A1 and one in A2 ..... with the total in A3.Code:Option Explicit Private Sub CommandButton1_Click() Sheets("Sheet1").Range("A3").Formula = TextBox1.Text End Sub
ex: =SUM(A1:A2)
or
ex: =A1-A2
or
ex: =A1*A2




Reply With Quote

Bookmarks