Friday, November 3, 2017

Textbox Sum Total On Controltiptext excel VBA



VBA Code
Private Sub UserForm_Initialize()
For i = 1 To 10
Me("textbox" & i).Value = Sheet1.Cells(i + 1, "E").Value
a = Application.WorksheetFunction.SumIf(Sheet1.Range("A:A"), _
Me("Textbox" & i).Value, Sheet1.Range("B:B"))
Me("textbox" & i).ControlTipText = a & ".00"
Next i
End Sub