This should be easy for me, but I'm having a mental block.
I have a userform list, with the list value as follows:
134 Fred Bloggs, London
I want to assign the number at the beginning of the list value to a long variable, lNumber. The command I came up with is as follows, but it is not working:
lNumber = val(left(ListBox1.value, Application.WorksheetFunction.Find(" ", ListBox1.value)-1))
Can anyone tell me where I'm going wrong please?
Thanks!
Bookmarks