Search code examples
databaseuserform

Highlight Userform output if row in excel of particular data is highlight


I badly need your help please,

As per this screenshot I have created userform to search and mark payment cheques. When I press mark entire row get highlighted of both cheques and on unmark both rows get unhighlight.

note 3 things I need to add in this form.

1)if the searched bl number's row is already highlighted than on userform also should highlight so we come to know that its already highlighted.(chequre number input field should highlight.)

  1. if searching row is already highlighted, that means its mark, so again mark is not making sense, so if its already mark so mark button should be disable.

  2. Sometimes due to any reason user may wish to mark 1 cheque instead of both on 1 bl number. so there should be a check box on right side, so user can select which cheques should be mark or not.

thanks in advance.


Solution

  • After some research, I found that I can highlight the input box with the below code.

    explanation below.

    UserForm1.c6.BackColor = &H80000005

    explanation where userform1 is userform name c6 is the input field name BackColor is a property H80000005 is the color code.