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
No comments:
Post a Comment
Please do not enter any spam message in comment box