Answered by:
How to kill a data in a TextBox

Question
-
Hi,
I have a dialog box (UserForm) which displays the data of the previous project, even if it is closed.
How can I "kill" the content of these TextBox so that the first time I open the UserForm, they are blank ?
Thanks
Friday, December 9, 2016 4:59 PM
Answers
-
WLID1966,
I'd first check the properties of the text box. The value should be blank. If it is blank but you are still getting a "hold over" value in the text box then apparently the UserForm is not unloaded at the end of the code (e.g. Unload MyForm).
John
- Marked as answer by WLID1966 Saturday, December 10, 2016 1:41 PM
Friday, December 9, 2016 8:48 PM -
Hi
The below works in JavaScript, but should be able to find depending on the language you are using.
txtTextBox.value=""
Ram
- Proposed as answer by Ramdas Subramanian Friday, December 9, 2016 7:31 PM
- Marked as answer by WLID1966 Saturday, December 10, 2016 1:41 PM
Friday, December 9, 2016 7:31 PM
All replies
-
Hi
The below works in JavaScript, but should be able to find depending on the language you are using.
txtTextBox.value=""
Ram
- Proposed as answer by Ramdas Subramanian Friday, December 9, 2016 7:31 PM
- Marked as answer by WLID1966 Saturday, December 10, 2016 1:41 PM
Friday, December 9, 2016 7:31 PM -
WLID1966,
I'd first check the properties of the text box. The value should be blank. If it is blank but you are still getting a "hold over" value in the text box then apparently the UserForm is not unloaded at the end of the code (e.g. Unload MyForm).
John
- Marked as answer by WLID1966 Saturday, December 10, 2016 1:41 PM
Friday, December 9, 2016 8:48 PM