wwbwb
Well-known Member
- Joined
- Oct 20, 2003
- Messages
- 513
Greetings all,
I have a question about the following code erroring out.
Col B is a list of serial numbers. Either 7 digits long (1234567) or 8 alphanumeric (W1234567). The combo boxes are loaded with col B when the userform is initialized. When I run the code, any serial number that begins with a letter, works. Any serial number I select that is strictly a number, errors out (Error 2042). The serial number is indeed there and if I put a letter in front of a 'number only' serial, it works perfectly. Any reason why it can't find the 'number only' serials?
I have a question about the following code erroring out.
Code:
dim res9 as variant
dim res4 as variant
res9 = application.match(combobox1.value, Range("B:B"), 0)
res4 = application.match(combobox2.value, Range("B:B"), 0)
Range("e" & res9).value = userform4.textbox1.value
Range("e" & res4).value = userform4.textbox1.value
Col B is a list of serial numbers. Either 7 digits long (1234567) or 8 alphanumeric (W1234567). The combo boxes are loaded with col B when the userform is initialized. When I run the code, any serial number that begins with a letter, works. Any serial number I select that is strictly a number, errors out (Error 2042). The serial number is indeed there and if I put a letter in front of a 'number only' serial, it works perfectly. Any reason why it can't find the 'number only' serials?
Last edited: