Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2006

Tip: Looking for answers? Try searching our database.

HOW CAN I HAVE A CONSTANT VALUE IN A COMBOBOX

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Zigball - 18 Dec 2006 16:25 GMT
I NEED TO HAVE A WORD DISPLAYED IN A COMBOBOX BEFORE SELCTION, EXAMPLE
"ENTER".
IT GETS TRICKY I ALSO NEED TO HAVE THIS WORD AND ONLY THAT WORD
DISPLAYED IN A DIFFERENT COLOR, SUCH AS RED. IS THERE ANYONE THAT KNOWS
HOW TO DO THIS AND CAN HELP ME, THANKS IN ADVANCE!

example code:

Sub AutoOpen()
ComboBox1.ColumnWidths = 300

ComboBox2.AddItem "2006"
ComboBox2.AddItem "2007"
ComboBox2.AddItem "2008"
ComboBox2.AddItem "2009"
ComboBox2.AddItem "2010"
ComboBox2.AddItem "2011"

Label1.BackColor = &HFFFFFF
Label1.BackStyle = fmBackStyleTransparent



End Sub
Doug Robbins - Word MVP - 18 Dec 2006 18:27 GMT
You could probably superimpose a label over the combobox with the word that
you want in that colour and have the Click event of the combobox hide the
label when the user goes to access it.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I NEED TO HAVE A WORD DISPLAYED IN A COMBOBOX BEFORE SELCTION, EXAMPLE
> "ENTER".
[quoted text clipped - 18 lines]
>
> End Sub
Zigball - 18 Dec 2006 20:23 GMT
Do you mean like a me.hide command, i think it is my only hope sounds
like a great idea, thank you!

> You could probably superimpose a label over the combobox with the word that
> you want in that colour and have the Click event of the combobox hide the
[quoted text clipped - 30 lines]
> >
> > End Sub
Doug Robbins - Word MVP - 19 Dec 2006 04:49 GMT
The label control will have a name by default, but I suggest that you give
it a meaningful one.  Assuming however that the name is Label1, the you
would use

Label1.Visible = False

to hide it.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Do you mean like a me.hide command, i think it is my only hope sounds
> like a great idea, thank you!
[quoted text clipped - 34 lines]
>> >
>> > End Sub

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.