03856me
Active Member
- Joined
- Apr 4, 2008
- Messages
- 297
I have a userform with a textbox whose value comes from a named cell "nextUnitnumber" on worksheet "data". As I add data to the worksheet using the userform the "nextUnitnumber" changes. However, the textbox value on the userform does not refresh.
In my UserForm_Initialize event I am populating the textbox with this code, which works fine:
When I execute the code to clear the userform to make ready for the next record I am using the same code with an additional "frm_dataInput.Repaint" command, which does not correctly update from the worksheet value every time, just occasionally.
How do I get the txt_unithumber.Value to refresh EACH time the named cell "nextUnitnumber" value changes without closing the userform and restarting the process?
In my UserForm_Initialize event I am populating the textbox with this code, which works fine:
Code:
Me.txt_unitnumber.Value = Sheets("data").Range("nextUtilnumber").Value
When I execute the code to clear the userform to make ready for the next record I am using the same code with an additional "frm_dataInput.Repaint" command, which does not correctly update from the worksheet value every time, just occasionally.
How do I get the txt_unithumber.Value to refresh EACH time the named cell "nextUnitnumber" value changes without closing the userform and restarting the process?