PDA

View Full Version : VBA Userform match issue



nbrown6
06-03-2019, 03:36 PM
Hi all,

This will probably be really simple, but im pulling my hair out trying to understand why this wont work.

I have produced a basic sample of what i have in another bigger project.

I want the code to lookup the value entered in a userform textbox. Iv used the _Exit event to trigger the code which uses the Match funtion to return the row.

For some reason this does not work with the long number (rfid tag id) but if you use 'Test' it works perfectly.

Could someone have a look and point me in the right direction.

Paul_Hossler
06-03-2019, 04:44 PM
Textbox returns strings, but you're matching numbers

The double -- just makes it into a number




targetrow = Application.WorksheetFunction.Match(--TextBox5, Sheets("runners").Range("Tag_Number"), 0)



24346

nbrown6
06-04-2019, 12:19 AM
Cheers Paul,

Knew the answer would be really simple. Thanks for having a look.:bow: