How to stop a userform from automatically clearing a textbox

AndrewGKenneth

Board Regular
Joined
Aug 6, 2018
Messages
59
Hi there,

I am having an odd issue with my userform. I have one textbox coded TextBox_UniqueReference3 that appears to be automatically clearing its value when I click the add command button on my userform. This is an issue because I have programmed a vlookup on TextBox_UniqueReference3.value using the change event, so when it clears itself when the add data command button is clicked users will be presented with an error message.

This is happening despite me nowhere in my code clearing this textbox. So my question is how do I code to prevent TextBox_UniqueReference3 clearing itself when my add command button is clicked?

Thanks,
Andrew
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,215,140
Messages
6,123,270
Members
449,093
Latest member
Vincent Khandagale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top