Hi,
I have trouble with userform, my textbox is not filled out unless I click on it. I want it to automatically be filled when I initialize it.
![]()
Please Login or Register to view this content.
Hi,
I have trouble with userform, my textbox is not filled out unless I click on it. I want it to automatically be filled when I initialize it.
![]()
Please Login or Register to view this content.
Last edited by Macster; 01-23-2009 at 05:38 AM.
You need the code in the initialize event not the textbox change
![]()
Please Login or Register to view this content.
Last edited by royUK; 01-23-2009 at 05:26 AM.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Roy beat me to it (when I "previewed post"), but to add to his suggestion I recommend adding this line of code at the end of your sub:
hth![]()
Please Login or Register to view this content.
Rob
Last edited by broro183; 01-23-2009 at 03:26 AM. Reason: Ooopps! Roy not Ron!
Rob Brockett
Kiwi in the UK
Always learning & the best way to learn is to experience...
Hmm, still not working, I've tried something as simple as
But it's still not working...![]()
Please Login or Register to view this content.
How are you adding the code/ Is it in the UserForm module?
Attach the workbook containing he userform
Can you please attach an example workbook?
Is your text box actually called "Txtbox"?
Click on it in VBE & press [F4] to bring up the properties & name will be listed somewhere in the property list.
Rob
Yep, the textbox is called TxtBox
I've stripped the document of unnecessary things and kept only a button aswell as the userform. Find it attached.
You've typed the code in from scratch including the initialize. You should select it from the dropdown on the right. It should not be the userform name but
![]()
Please Login or Register to view this content.
I bow to your wisdom. Maaany thanks!
No problem
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks