Hi All!
Usually programming in Access, Excel continues to throw me for a loop. I have a userform that fills in the value of a textbox from a worksheet as it initializes. Then I also have code in the textbox’s BeforeUpdate event, so that if a user puts in a new value, a calculation is made (actually a database call and several calculations) and new information shows up in the rest of the form.
The problem is that it seems that on initialize, the form is also executing the BeforeUpdate code, so it seems to take a bunch of time for the form to open. I suppose it’s not a huge problem, but I would prefer that the form open immediately with the existing worksheet values and wait to execute BeforeUpdate until the user actually changes the information in the textbox.
My problem is that I can’t figure out how to trigger Cancel on the BeforeUpdate, nor can I find anything that shows “OldValue” or “NewValue” of the textbox in Excel (so that at least I could test whether the data came from the worksheet on initialize or from user intervention).
Anyone have any ideas?
TIA!