how can i put a value in a textbox specifically a date that uses a calendar as a tool.
also i wanted to place a option button that if selected will disable a certain toolbox in a userform
pls help..
how can i put a value in a textbox specifically a date that uses a calendar as a tool.
also i wanted to place a option button that if selected will disable a certain toolbox in a userform
pls help..
Add the calendar control to the form, and just get Value porperty and load the texbox with that.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
thanks a lot xld
how about i have a several option button in a userform that when selected will simultaneously disable a certain textbox in a userform
Yeah, you can do that
[vba]
Private Sub CommandButton1_Click()
With Me.Textbox1
.Enabled = .Enabled
End With
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
i've done the textbox disabling process but i still have problem with the calendar in the userform.
what i wnted to do is a combobox loaded with calendar...
im going to select a date and then this will be the value in the box..
can u pls help...
with certain detail pls.im just new with vba.
Well, first of all I provide you the codes to enable/disable the text box on the selection of a check box
1. Place a textbox and a check box on the user form
Private Sub CheckBox1_Click() TextBox1.Enabled = CheckBox1.Value End Sub
2. Now for adding calendar control to your user form, select Microsoft Calendar Control11.0 from the components dialog box.
3. Add the calendar control to the user form and add following codes to the code window
Private Sub Calendar1_Click() TextBox1.Text = Calendar1.Value End Sub
What do you mean by ... a combobox loaded with a calendar?Originally Posted by mortred
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Originally Posted by xld
its like a dropdownlist that will pop up a calendar when selected
i assumed it is a combo box becoz thats how i imagine it looks like.....
is it possible?
Popup for what purpose, what do you want to do with it?
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
just for selecting a date for the specific textbox so that it will not consume space in the userform
Now you are confusing me. You started by saying combobox, now you are saying Textbox. What are you trying to do, just save the selected calendar date on the form somewhere?
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Originally Posted by xld
I will use the userform for data entry and i have several textboxes...
while encoding on the boxes that does not require a date entry i dont want the calendar to appear in the form, when im about to encode a required date the calendar will appear.