Hello everybody,
Can someone help me, please?
I don't understand why the vlookup function works if I write the value I am looking for in a cell, but does not work from the textbox. while the figure mentioned is the right one.
Since I'm looking for a number, I used the CDbl function to transform the content of the textbox into a number (at least I think), but it doesn't work.
Thank you for your help.
Have a nice day.
Can someone help me, please?
I don't understand why the vlookup function works if I write the value I am looking for in a cell, but does not work from the textbox. while the figure mentioned is the right one.
Since I'm looking for a number, I used the CDbl function to transform the content of the textbox into a number (at least I think), but it doesn't work.
Thank you for your help.
Have a nice day.
Rich (BB code):
Set zone_recherche_1 = WS3.Range("A:H") 'WS3.Range("Tableau_Extraction_OF")
ws1.Range("E17") = Numéro_OF
' Inscrire le numéro d'OF dans la textbox1
UserForm1.TextBox1 = Numéro_OF
UserForm1.TextBox1.Value = CDbl(UserForm1.TextBox1.Value) 'N° OF
' Fonction VLookUp "Plan N°"
'On Error GoTo Invalid_NumPlan:
' Num_Plan = WorksheetFunction.VLookup(ws1.Range("E17"), zone_recherche_1, 4, False)
Num_Plan = WorksheetFunction.VLookup(UserForm1.TextBox1, zone_recherche_1, 4, False)