The goal is whenever I type a manager name on the textbox; it will search manager on all sheets then load all of the username who reports to the manager on the checkbox caption. The below codes works to find and load values to only one sheets. However sometimes, I have more than 1 sheet (This exclude the main sheet).
File
Sheet 2 (Employee):
username | first | last | manager | role | status
HAkon | Howard | Akon | Don Kong | User |
JCorny1 | Jones | Corny | Don Kong | User |
HMighty | Howard | Mighty | Jack Ben | Manager |
Sheet 3 (Contractor):
username | first | last | manager | role | status
DNygen | Dong | Nygen | Don Kong | User |
LNygen | Lee | Nygen | Don Kong | User |
Sheet 4 (Service):
username | first | last | manager | role | status
BFinney | Barney | Finney | Don Kong | User |
CKon | Carillo | Kon | Luz Kurt | Rookie |
Codes for 1 sheet only
What I tried and did not work was I set the 'for n = 1 to sheets.count' above code 'With AR.Range("D:D")', set all 'AR.Range' to 'Sheets(n).Range', then put 'next n' after 'End with'. This only grabs the last person of the sheets it finds then replace it on all checkboxes.Please Login or Register to view this content.
Bookmarks