Hi, I am having trouble with the setfocus command and I have done a bit of searching but my knowledge of vba is very little.
I have managed to get the following code with help but the setfocus in the Private Sub UnitCost_Change() is not working.
I would like a number value to be entered in TextboxControl and on typing a value if the data is not in the correct format a message will appear with an OK Button. When OK is selected I would like the wrong data to be cleared and the cursor back in the TextboxControl.
The code below is working fine except the SetFocus doesn't appear in the activate control.
Here is the code in Module mode:
Here is the code in Userform mode:Please Login or Register to view this content.
Thanks in advance.Please Login or Register to view this content.
Bookmarks