Hi All

I have several Checkboxes. I have commandbutton also. Every checkboxes it have an assigned a one textbox to which I transfer the data. When I click on the commandbutton I want to make that this data will be only for this textboxes which will have checkbox with value as True (vbchecked) How to make?

When I make something like this
VB Code:
  1. If chkWTY.Value = vbChecked then
  2.   txtWTY.Text = SumPio
  3. ElseIf chkGRB.Value = vbChecked then
  4.   txtGRB.Text = AsHun
  5. ...etc
  6. ...etc
  7. End If

it not work

thanks in advance