Thanks for the pointer Jon, I hadn't considered an empty string situation
Couple of questions regarding your example out of curiosity
- Why double, as I am dealing with typed values of 0 to 255, is there any reason not to define number as integer or long?
- Should line 4 read:
number = CDbl(.Value)
Maybe I'm trying to be too clever and yes of course I could write it as Jan had suggested (thanks btw).
I was merely wondering if there was a method to determine the control name from the event but ultimately doing so isn't really that important in VBA as if the control is renamed in the designer, the control even isn't automatically renamed like it would be in visual studio and I would have to rename the controls event anyway.
Thanks again for the advice