Hi,
I am doing a form where I have 8 textboxs named ddc, example: ddc1, ddc1...ddcn.
then I have another textbox name quantcoup, that is the textbox I want to receive the count if of everyone of the ddcs that have text in it throughout a command button. Also, I want that the count if detect it as text, but the vba code I used is not working for me, the code is the next:
I´m new at vba and Ive been doing research in the internet but I can´t get a working method for this, if anyone could help it would be great.
Thanks
I am doing a form where I have 8 textboxs named ddc, example: ddc1, ddc1...ddcn.
then I have another textbox name quantcoup, that is the textbox I want to receive the count if of everyone of the ddcs that have text in it throughout a command button. Also, I want that the count if detect it as text, but the vba code I used is not working for me, the code is the next:
Code:
Private Sub CommandButton2_Click()
On Error Resume Next
quantcoup.Text = Abs((ddc1.Value = "*") + (ddc2.Value = "*") + (ddc3.Value = "*")+ (ddc4.Value = "*")+ (ddc5.Value = "*")+ (ddc6.Value = "*")+ (ddc7.Value = "*")+ (ddc8.Value = "*"))
End Sub
I´m new at vba and Ive been doing research in the internet but I can´t get a working method for this, if anyone could help it would be great.
Thanks