hi everyone
I have a userform with combobox, textbox, CommanButton( to add data in worksheet) and two Labels. One of these is changed with the value of the cell in worksheet.
how can I do a label change according the value of the cell in worksheet, without log out of the userform?Its a problem with refresh values that I need to know.
My code is:xx
My code:
Private Sub UserForm_Initialize()
Dim tt As Double
Label1.Caption = tt
tt = WorksheetFunction.Sum(Sheets("ws-vba").Range("A2"))
Label1.Caption = Format(tt, "#.00 €")
If Label1.Caption <> "" Then
Label2.Caption = "DUOD"
End If
Private Sub CmdAdd_click()
If WorksheetFunction.Sum(Sheets("ws-vba").Range("A2")) = 0 Then
Label1.Caption = ""
Label2.Caption = ""
Else
WorksheetFunction.Sum (Sheets("ws-vba").Range("A2"))
End If
End sub
Thanks advence
Bookmarks