cerberus1845
New Member
- Joined
- Nov 14, 2023
- Messages
- 23
- Office Version
- 2021
- Platform
- Windows
- MacOS
Hi,
Hoping someone can help me - I have a userform that has 2 combo boxes on it. One is for Recruiter Name and the other is for Recruiter ID - these are listed in a table on a separate sheet. I need these to be linked so that when you select an Employee ID in the combobox then it automatically populates the Recruiter Name and vice versa. The code I have below *works as in the values populate correctly - when I attempt to update the record on the userform then I get an error (the data still updates but receive the following error:
Run-time error '91':
Object variable or With block variable not set:
This is the code I currently have- can someone explain where I've went wrong - I'm relatively new to VBA - any help would be amazing!!
Hoping someone can help me - I have a userform that has 2 combo boxes on it. One is for Recruiter Name and the other is for Recruiter ID - these are listed in a table on a separate sheet. I need these to be linked so that when you select an Employee ID in the combobox then it automatically populates the Recruiter Name and vice versa. The code I have below *works as in the values populate correctly - when I attempt to update the record on the userform then I get an error (the data still updates but receive the following error:
Run-time error '91':
Object variable or With block variable not set:
This is the code I currently have- can someone explain where I've went wrong - I'm relatively new to VBA - any help would be amazing!!
VBA Code:
Private Sub cmbRecruiterEmplID_Change()
cmbRecruiterName.Value = [Table1].Find(cmbRecruiterEmplID, , xlValues).Offset(0, 1)
End Sub
Private Sub cmbRecruiterName_Change()
cmbRecruiterEmplID.Value = [Table1].Find(cmbRecruiterName, , xlValues).Offset(0, -1)
End Sub