![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 24
|
I currently am using a userform with a MultiPage and many textboxes and comboboxes. I have a button at the bottom of the userform to reset or clear the textboxes and comboboxes. The problem is that you have to hit the button twice to work. Below is the basic code that I am using. Does anyone know how to make this work by hitting the button only once?
UserForm1.MultiPage1.Value = 0 UserForm1.TextBox1.Value = "" UserForm1.ComboBox1.Value = "bhp" Thanks for the help. |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 103
|
Try clicking on the button (once) then go to the properties window and select the Default property, select true under the pop up list. if this doesnt work, reply and ill try again.
Will |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hi.
If, when your userform is intialized, the values of these textboxes = "" then simply unload and reload your form. Such as Unload Me UserForm1.Show Think it through if you have other code in this event(initialize) Tom [ This Message was edited by: TsTom on 2002-04-01 10:00 ] |
|
|
|
|
|
#4 |
|
New Member
Join Date: Mar 2002
Posts: 24
|
Thanks for the help, but maybe I should better explain my problem. I have a userform that accepts information in textboxes, but the user might want to start over and clear the textboxes and reset the userform. I used the button to do this function, but you have to hit it twice to work. Is there another way of clearing and reseting information without coming out of the userform?
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Posts: 60
|
Hi
I agree with Tom if you just set the clear button to unload and then reload the userform with screen updating turned off then the user will think that the button has cleared all the data and you have the end result you want...... ....unless you don't want the clear button to clear all the data, just some of it? Dan |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|