Drop-Down List (ComboBox) and Text Box questions 
Author Message
 Drop-Down List (ComboBox) and Text Box questions

I have created a drop-down list and used the additem
method in VBA to fill the list with values.  What I am
wondering is if there is any way to disable the entry of
text into the combo box?

Also I am trying to insert default date values in to text
boxes but i would like the format to remain consistent as
well.  I cannot seem to figure out how to do this. Can
some please help??

BTW I am using Word 2000.

TIA
Jules



Tue, 08 Feb 2005 22:38:59 GMT  
 Drop-Down List (ComboBox) and Text Box questions
Hi, Jules,

In the Property list for the combo box, set the MatchRequired property
to True. Alternatively, include a line like this in the
Userform_Initialize procedure:

    ComboBox1.MatchRequired = True

To format dates, do something like this:

    TextBox1.Text = Format(Date, "MMMM dd, yyyy")

Look up the Format function in VBA help to see how the formatting string
works.

--
Regards,
Jay Freedman
Microsoft Word MVP        Word MVP FAQ site: http://www.mvps.org/word

Quote:

> I have created a drop-down list and used the additem
> method in VBA to fill the list with values.  What I am
> wondering is if there is any way to disable the entry of
> text into the combo box?

> Also I am trying to insert default date values in to text
> boxes but i would like the format to remain consistent as
> well.  I cannot seem to figure out how to do this. Can
> some please help??

> BTW I am using Word 2000.

> TIA
> Jules



Wed, 09 Feb 2005 00:39:19 GMT  
 Drop-Down List (ComboBox) and Text Box questions
I already have the matchrequired set to true.  The problem
is the default error message is invlaid property value.  
What would i have to do to modify this so that i could
either change the message? or disable editting the box so
that the end-user could not modify the contents?

Thanks for the help,

Jules

Quote:
>-----Original Message-----
>Hi, Jules,

>In the Property list for the combo box, set the

MatchRequired property
Quote:
>to True. Alternatively, include a line like this in the
>Userform_Initialize procedure:

>    ComboBox1.MatchRequired = True

>To format dates, do something like this:

>    TextBox1.Text = Format(Date, "MMMM dd, yyyy")

>Look up the Format function in VBA help to see how the
formatting string
>works.

>--
>Regards,
>Jay Freedman
>Microsoft Word MVP        Word MVP FAQ site:

http://www.mvps.org/word

- Show quoted text -

Quote:


>> I have created a drop-down list and used the additem
>> method in VBA to fill the list with values.  What I am
>> wondering is if there is any way to disable the entry of
>> text into the combo box?

>> Also I am trying to insert default date values in to
text
>> boxes but i would like the format to remain consistent
as
>> well.  I cannot seem to figure out how to do this. Can
>> some please help??

>> BTW I am using Word 2000.

>> TIA
>> Jules

>.



Wed, 09 Feb 2005 00:50:01 GMT  
 Drop-Down List (ComboBox) and Text Box questions
Hi, Jules,

Ahh, that's different. Use this:

    ComboBox1.Style = fmStyleDropDownList

or set the property at design time. That disables editing in the box.
You probably also want to set

    ComboBox1.MatchEntry = fmMatchEntryFirstLetter

Then, pressing letter keys makes the entry in the box jump to the next
value in the list that starts with that letter. If there are no entries
starting with that letter, nothing happens.

--
Regards,
Jay Freedman
Microsoft Word MVP        Word MVP FAQ site: http://www.mvps.org/word

Quote:

> I already have the matchrequired set to true.  The problem
> is the default error message is invlaid property value.
> What would i have to do to modify this so that i could
> either change the message? or disable editting the box so
> that the end-user could not modify the contents?

> Thanks for the help,

> Jules

>> -----Original Message-----
>> Hi, Jules,

>> In the Property list for the combo box, set the MatchRequired
>> property to True. Alternatively, include a line like this in the
>> Userform_Initialize procedure:

>>    ComboBox1.MatchRequired = True

>> To format dates, do something like this:

>>    TextBox1.Text = Format(Date, "MMMM dd, yyyy")

>> Look up the Format function in VBA help to see how the formatting
>> string works.

>> --
>> Regards,
>> Jay Freedman
>> Microsoft Word MVP        Word MVP FAQ site: http://www.mvps.org/word


>>> I have created a drop-down list and used the additem
>>> method in VBA to fill the list with values.  What I am
>>> wondering is if there is any way to disable the entry of
>>> text into the combo box?

>>> Also I am trying to insert default date values in to text
>>> boxes but i would like the format to remain consistent as
>>> well.  I cannot seem to figure out how to do this. Can
>>> some please help??

>>> BTW I am using Word 2000.

>>> TIA
>>> Jules

>> .



Wed, 09 Feb 2005 04:07:54 GMT  
 Drop-Down List (ComboBox) and Text Box questions
Thank you very much for the help that is exactly what i
wanted to do.

Jules



Fri, 11 Feb 2005 20:17:12 GMT  
 Drop-Down List (ComboBox) and Text Box questions
Ok I was wrong, thought this was exactly what I wanted.  I
am getting an error now that says "Could not set the Text
property.  Invalid property value."

I have my combobox.listindex=0

Thanks again

Quote:
>-----Original Message-----
>Hi, Jules,

>Ahh, that's different. Use this:

>    ComboBox1.Style = fmStyleDropDownList

>or set the property at design time. That disables editing
in the box.
>You probably also want to set

>    ComboBox1.MatchEntry = fmMatchEntryFirstLetter

>Then, pressing letter keys makes the entry in the box
jump to the next
>value in the list that starts with that letter. If there
are no entries
>starting with that letter, nothing happens.

>--
>Regards,
>Jay Freedman
>Microsoft Word MVP        Word MVP FAQ site:

http://www.mvps.org/word

- Show quoted text -

Quote:


>> I already have the matchrequired set to true.  The
problem
>> is the default error message is invlaid property value.
>> What would i have to do to modify this so that i could
>> either change the message? or disable editting the box
so
>> that the end-user could not modify the contents?

>> Thanks for the help,

>> Jules

>>> -----Original Message-----
>>> Hi, Jules,

>>> In the Property list for the combo box, set the
MatchRequired
>>> property to True. Alternatively, include a line like
this in the
>>> Userform_Initialize procedure:

>>>    ComboBox1.MatchRequired = True

>>> To format dates, do something like this:

>>>    TextBox1.Text = Format(Date, "MMMM dd, yyyy")

>>> Look up the Format function in VBA help to see how the
formatting
>>> string works.

>>> --
>>> Regards,
>>> Jay Freedman
>>> Microsoft Word MVP        Word MVP FAQ site:

http://www.mvps.org/word

- Show quoted text -

Quote:


>>>> I have created a drop-down list and used the additem
>>>> method in VBA to fill the list with values.  What I am
>>>> wondering is if there is any way to disable the entry
of
>>>> text into the combo box?

>>>> Also I am trying to insert default date values in to
text
>>>> boxes but i would like the format to remain
consistent as
>>>> well.  I cannot seem to figure out how to do this. Can
>>>> some please help??

>>>> BTW I am using Word 2000.

>>>> TIA
>>>> Jules

>>> .

>.



Fri, 11 Feb 2005 21:29:49 GMT  
 Drop-Down List (ComboBox) and Text Box questions
What are you doing when that error occurs? If you're given the chance to
go into the de{*filter*}, what line is highlighted? (Paste the surrounding
section of the code into your message and point to the highlighted
line.)

--
Regards,
Jay Freedman
Microsoft Word MVP        Word MVP FAQ site: http://www.*-*-*.com/

Quote:

> Ok I was wrong, thought this was exactly what I wanted.  I
> am getting an error now that says "Could not set the Text
> property.  Invalid property value."

> I have my combobox.listindex=0

> Thanks again

>> -----Original Message-----
>> Hi, Jules,

>> Ahh, that's different. Use this:

>>    ComboBox1.Style = fmStyleDropDownList

>> or set the property at design time. That disables editing in the box.
>> You probably also want to set

>>    ComboBox1.MatchEntry = fmMatchEntryFirstLetter

>> Then, pressing letter keys makes the entry in the box jump to the
>> next value in the list that starts with that letter. If there are no
>> entries starting with that letter, nothing happens.

>> --
>> Regards,
>> Jay Freedman
>> Microsoft Word MVP        Word MVP FAQ site: http://www.*-*-*.com/


>>> I already have the matchrequired set to true.  The problem
>>> is the default error message is invlaid property value.
>>> What would i have to do to modify this so that i could
>>> either change the message? or disable editting the box so
>>> that the end-user could not modify the contents?

>>> Thanks for the help,

>>> Jules

>>>> -----Original Message-----
>>>> Hi, Jules,

>>>> In the Property list for the combo box, set the MatchRequired
>>>> property to True. Alternatively, include a line like this in the
>>>> Userform_Initialize procedure:

>>>>    ComboBox1.MatchRequired = True

>>>> To format dates, do something like this:

>>>>    TextBox1.Text = Format(Date, "MMMM dd, yyyy")

>>>> Look up the Format function in VBA help to see how the formatting
>>>> string works.

>>>> --
>>>> Regards,
>>>> Jay Freedman
>>>> Microsoft Word MVP        Word MVP FAQ site:
>>>> http://www.*-*-*.com/


>>>>> I have created a drop-down list and used the additem
>>>>> method in VBA to fill the list with values.  What I am
>>>>> wondering is if there is any way to disable the entry of
>>>>> text into the combo box?

>>>>> Also I am trying to insert default date values in to text
>>>>> boxes but i would like the format to remain
> consistent as
>>>>> well.  I cannot seem to figure out how to do this. Can
>>>>> some please help??

>>>>> BTW I am using Word 2000.

>>>>> TIA
>>>>> Jules

>>>> .

>> .



Sat, 12 Feb 2005 00:28:37 GMT  
 Drop-Down List (ComboBox) and Text Box questions
I am just trying to run my form.  I don't have it going
into the de{*filter*} and it only occurs after this is changed
ComboBox1.Style = fmStyleDropDownList

Quote:
>-----Original Message-----
>What are you doing when that error occurs? If you're
given the chance to
>go into the de{*filter*}, what line is highlighted? (Paste
the surrounding
>section of the code into your message and point to the
highlighted
>line.)

>--
>Regards,
>Jay Freedman
>Microsoft Word MVP        Word MVP FAQ site:

http://www.*-*-*.com/
Quote:


>> Ok I was wrong, thought this was exactly what I
wanted.  I
>> am getting an error now that says "Could not set the
Text
>> property.  Invalid property value."

>> I have my combobox.listindex=0

>> Thanks again

>>> -----Original Message-----
>>> Hi, Jules,

>>> Ahh, that's different. Use this:

>>>    ComboBox1.Style = fmStyleDropDownList

>>> or set the property at design time. That disables
editing in the box.
>>> You probably also want to set

>>>    ComboBox1.MatchEntry = fmMatchEntryFirstLetter

>>> Then, pressing letter keys makes the entry in the box
jump to the
>>> next value in the list that starts with that letter.
If there are no
>>> entries starting with that letter, nothing happens.

>>> --
>>> Regards,
>>> Jay Freedman
>>> Microsoft Word MVP        Word MVP FAQ site:

http://www.*-*-*.com/

- Show quoted text -

Quote:


>>>> I already have the matchrequired set to true.  The
problem
>>>> is the default error message is invlaid property
value.
>>>> What would i have to do to modify this so that i could
>>>> either change the message? or disable editting the
box so
>>>> that the end-user could not modify the contents?

>>>> Thanks for the help,

>>>> Jules

>>>>> -----Original Message-----
>>>>> Hi, Jules,

>>>>> In the Property list for the combo box, set the
MatchRequired
>>>>> property to True. Alternatively, include a line like
this in the
>>>>> Userform_Initialize procedure:

>>>>>    ComboBox1.MatchRequired = True

>>>>> To format dates, do something like this:

>>>>>    TextBox1.Text = Format(Date, "MMMM dd, yyyy")

>>>>> Look up the Format function in VBA help to see how
the formatting
>>>>> string works.

>>>>> --
>>>>> Regards,
>>>>> Jay Freedman
>>>>> Microsoft Word MVP        Word MVP FAQ site:
>>>>> http://www.*-*-*.com/


>>>>>> I have created a drop-down list and used the additem
>>>>>> method in VBA to fill the list with values.  What I
am
>>>>>> wondering is if there is any way to disable the
entry of
>>>>>> text into the combo box?

>>>>>> Also I am trying to insert default date values in
to text
>>>>>> boxes but i would like the format to remain
>> consistent as
>>>>>> well.  I cannot seem to figure out how to do this.
Can
>>>>>> some please help??

>>>>>> BTW I am using Word 2000.

>>>>>> TIA
>>>>>> Jules

>>>>> .

>>> .

>.



Sat, 12 Feb 2005 00:44:34 GMT  
 Drop-Down List (ComboBox) and Text Box questions
Do you have any code in the form that tries to assign a value to the
.Text property of any combo box?

It's very hard to tell what's going on when you don't give me any code
to look at...

--
Regards,
Jay Freedman
Microsoft Word MVP        Word MVP FAQ site: http://www.*-*-*.com/

Quote:

> I am just trying to run my form.  I don't have it going
> into the de{*filter*} and it only occurs after this is changed
> ComboBox1.Style = fmStyleDropDownList

>> -----Original Message-----
>> What are you doing when that error occurs? If you're given the
>> chance to go into the de{*filter*}, what line is highlighted? (Paste the
>> surrounding section of the code into your message and point to the
>> highlighted line.)

>> --
>> Regards,
>> Jay Freedman
>> Microsoft Word MVP        Word MVP FAQ site: http://www.*-*-*.com/


>>> Ok I was wrong, thought this was exactly what I
> wanted.  I
>>> am getting an error now that says "Could not set the Text
>>> property.  Invalid property value."

>>> I have my combobox.listindex=0

>>> Thanks again

>>>> -----Original Message-----
>>>> Hi, Jules,

>>>> Ahh, that's different. Use this:

>>>>    ComboBox1.Style = fmStyleDropDownList

>>>> or set the property at design time. That disables editing in the
>>>> box. You probably also want to set

>>>>    ComboBox1.MatchEntry = fmMatchEntryFirstLetter

>>>> Then, pressing letter keys makes the entry in the box jump to the
>>>> next value in the list that starts with that letter.
> If there are no
>>>> entries starting with that letter, nothing happens.

>>>> --
>>>> Regards,
>>>> Jay Freedman
>>>> Microsoft Word MVP        Word MVP FAQ site:
>>>> http://www.*-*-*.com/


>>>>> I already have the matchrequired set to true.  The problem
>>>>> is the default error message is invlaid property value.
>>>>> What would i have to do to modify this so that i could
>>>>> either change the message? or disable editting the
> box so
>>>>> that the end-user could not modify the contents?

>>>>> Thanks for the help,

>>>>> Jules

>>>>>> -----Original Message-----
>>>>>> Hi, Jules,

>>>>>> In the Property list for the combo box, set the MatchRequired
>>>>>> property to True. Alternatively, include a line like this in the
>>>>>> Userform_Initialize procedure:

>>>>>>    ComboBox1.MatchRequired = True

>>>>>> To format dates, do something like this:

>>>>>>    TextBox1.Text = Format(Date, "MMMM dd, yyyy")

>>>>>> Look up the Format function in VBA help to see how the formatting
>>>>>> string works.

>>>>>> --
>>>>>> Regards,
>>>>>> Jay Freedman
>>>>>> Microsoft Word MVP        Word MVP FAQ site:
>>>>>> http://www.*-*-*.com/


>>>>>>> I have created a drop-down list and used the additem
>>>>>>> method in VBA to fill the list with values.  What I am
>>>>>>> wondering is if there is any way to disable the entry of
>>>>>>> text into the combo box?

>>>>>>> Also I am trying to insert default date values in
> to text
>>>>>>> boxes but i would like the format to remain consistent as
>>>>>>> well.  I cannot seem to figure out how to do this. Can
>>>>>>> some please help??

>>>>>>> BTW I am using Word 2000.

>>>>>>> TIA
>>>>>>> Jules

>>>>>> .

>>>> .

>> .



Sat, 12 Feb 2005 02:32:32 GMT  
 Drop-Down List (ComboBox) and Text Box questions
Thank you I just figured that out it was exactly what I
did.  I used debug.print statements toi determine where my
problem was and i was trying to assign a text value to the
dropdown list.

Thanks for all your help on this ordered a book on word
VBA but waiting for it to come in.  

Thanks to you I may not need it now.  All the major
problems I have been having are now solved.

Jules

Quote:
>-----Original Message-----
>Do you have any code in the form that tries to assign a
value to the
>..Text property of any combo box?

>It's very hard to tell what's going on when you don't
give me any code
>to look at...

>--
>Regards,
>Jay Freedman
>Microsoft Word MVP        Word MVP FAQ site:

http://www.*-*-*.com/
Quote:


>> I am just trying to run my form.  I don't have it going
>> into the de{*filter*} and it only occurs after this is
changed
>> ComboBox1.Style = fmStyleDropDownList

>>> -----Original Message-----
>>> What are you doing when that error occurs? If you're
given the
>>> chance to go into the de{*filter*}, what line is

highlighted? (Paste the
Quote:
>>> surrounding section of the code into your message and
point to the
>>> highlighted line.)

>>> --
>>> Regards,
>>> Jay Freedman
>>> Microsoft Word MVP        Word MVP FAQ site:

http://www.*-*-*.com/
Quote:


>>>> Ok I was wrong, thought this was exactly what I
>> wanted.  I
>>>> am getting an error now that says "Could not set the
Text
>>>> property.  Invalid property value."

>>>> I have my combobox.listindex=0

>>>> Thanks again

>>>>> -----Original Message-----
>>>>> Hi, Jules,

>>>>> Ahh, that's different. Use this:

>>>>>    ComboBox1.Style = fmStyleDropDownList

>>>>> or set the property at design time. That disables
editing in the
>>>>> box. You probably also want to set

>>>>>    ComboBox1.MatchEntry = fmMatchEntryFirstLetter

>>>>> Then, pressing letter keys makes the entry in the
box jump to the
>>>>> next value in the list that starts with that letter.
>> If there are no
>>>>> entries starting with that letter, nothing happens.

>>>>> --
>>>>> Regards,
>>>>> Jay Freedman
>>>>> Microsoft Word MVP        Word MVP FAQ site:
>>>>> http://www.*-*-*.com/


>>>>>> I already have the matchrequired set to true.  The
problem
>>>>>> is the default error message is invlaid property
value.
>>>>>> What would i have to do to modify this so that i
could
>>>>>> either change the message? or disable editting the
>> box so
>>>>>> that the end-user could not modify the contents?

>>>>>> Thanks for the help,

>>>>>> Jules

>>>>>>> -----Original Message-----
>>>>>>> Hi, Jules,

>>>>>>> In the Property list for the combo box, set the
MatchRequired
>>>>>>> property to True. Alternatively, include a line
like this in the
>>>>>>> Userform_Initialize procedure:

>>>>>>>    ComboBox1.MatchRequired = True

>>>>>>> To format dates, do something like this:

>>>>>>>    TextBox1.Text = Format(Date, "MMMM dd, yyyy")

>>>>>>> Look up the Format function in VBA help to see how
the formatting
>>>>>>> string works.

>>>>>>> --
>>>>>>> Regards,
>>>>>>> Jay Freedman
>>>>>>> Microsoft Word MVP        Word MVP FAQ site:
>>>>>>> http://www.*-*-*.com/


>>>>>>>> I have created a drop-down list and used the
additem
>>>>>>>> method in VBA to fill the list with values.  What
I am
>>>>>>>> wondering is if there is any way to disable the
entry of
>>>>>>>> text into the combo box?

>>>>>>>> Also I am trying to insert default date values in
>> to text
>>>>>>>> boxes but i would like the format to remain
consistent as
>>>>>>>> well.  I cannot seem to figure out how to do
this. Can
>>>>>>>> some please help??

>>>>>>>> BTW I am using Word 2000.

>>>>>>>> TIA
>>>>>>>> Jules

>>>>>>> .

>>>>> .

>>> .

>.



Sat, 12 Feb 2005 02:40:34 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Drop Down List Box - Drop Down portion does not always disappear after Click event

2. How to clear text of drop-down list combobox

3. How to clear text of drop-down list combobox

4. Drop-down list box Question?

5. Drac's questions on drop down lists in combo boxes

6. Question on a drop down (List) box

7. List box with embeded drop down boxes

8. add, edit using drop down boxes and list boxes

9. Combobox used as a drop down list in a datagrid

10. drop down the list in a combobox programmatically

11. Combobox / Drop down list

12. User Input for ComboBox Drop Down List

 

 
Powered by phpBB® Forum Software