PC Review


Reply
Thread Tools Rate Thread

Combo Box Wont Show Values

 
 
Phil
Guest
Posts: n/a
 
      10th Feb 2008
Hi,

I have put a simple combobox in to my form and have coded the values for the
drop down in the VBA, looking like this

Private Sub cboRegion_Change()

End Sub
Private Sub UserForm1_Initialize()
With cboRegion
.AddItem "NW"
.AddItem "SW"
.AddItem "SE"
.AddItem "NE"
End With
cboRegion.Value = ""
End Sub

I have checked that the combobox name is the same but every time I run it, I
get none of the above values, am I doing something really silly.

Thanks
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      10th Feb 2008
Remove the "1" from your "UserForm1_Initialize" declaration... You should
really just select the event procedures from the drop down list provided
rather than type them in manually.

Rick



"Phil" <(E-Mail Removed)> wrote in message
news:5BCCB67F-08AE-42D1-81AE-(E-Mail Removed)...
> Hi,
>
> I have put a simple combobox in to my form and have coded the values for
> the
> drop down in the VBA, looking like this
>
> Private Sub cboRegion_Change()
>
> End Sub
> Private Sub UserForm1_Initialize()
> With cboRegion
> .AddItem "NW"
> .AddItem "SW"
> .AddItem "SE"
> .AddItem "NE"
> End With
> cboRegion.Value = ""
> End Sub
>
> I have checked that the combobox name is the same but every time I run it,
> I
> get none of the above values, am I doing something really silly.
>
> Thanks


 
Reply With Quote
 
Phil
Guest
Posts: n/a
 
      10th Feb 2008
Hi Rick

Thanks for that, thought it would be something stupid like that, teach me to
do these types of things so late at night.

Thanks Again, Phil

"Rick Rothstein (MVP - VB)" wrote:

> Remove the "1" from your "UserForm1_Initialize" declaration... You should
> really just select the event procedures from the drop down list provided
> rather than type them in manually.
>
> Rick
>
>
>
> "Phil" <(E-Mail Removed)> wrote in message
> news:5BCCB67F-08AE-42D1-81AE-(E-Mail Removed)...
> > Hi,
> >
> > I have put a simple combobox in to my form and have coded the values for
> > the
> > drop down in the VBA, looking like this
> >
> > Private Sub cboRegion_Change()
> >
> > End Sub
> > Private Sub UserForm1_Initialize()
> > With cboRegion
> > .AddItem "NW"
> > .AddItem "SW"
> > .AddItem "SE"
> > .AddItem "NE"
> > End With
> > cboRegion.Value = ""
> > End Sub
> >
> > I have checked that the combobox name is the same but every time I run it,
> > I
> > get none of the above values, am I doing something really silly.
> >
> > Thanks

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit combo box to show only values not already selected 0 1 Microsoft Access Queries 2 6th May 2011 07:33 PM
Combo does not show new values =?Utf-8?B?TWFyY28gU2lsdmE=?= Microsoft Access Forms 4 28th Sep 2006 03:09 PM
Using a listbox/combo box to show two values matpj Microsoft Excel Programming 1 14th Feb 2006 10:02 AM
How do I get a query to show all values when a combo control is em =?Utf-8?B?aHV6emxlcHV6emxl?= Microsoft Access Queries 17 12th Jul 2005 03:16 PM
Wont show Values, just formula mushy_peas Microsoft Excel Discussion 4 24th Nov 2003 11:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:52 PM.