PC Review


Reply
Thread Tools Rate Thread

Auto Populate Combo Box When Opening a Worksheet

 
 
spovolny@gmail.com
Guest
Posts: n/a
 
      2nd Jul 2007
Somebody PLEASE help me figure out how to autopopulate a combobox (the
control, not form) when opening an Excel sheet.

I literally just want to fill the cboBox with a set of text values
automatically when opening the document. This should be simple,
right??? Thanks,
Steve

 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      2nd Jul 2007
Try something like the following. It MUST be in the ThisWorkbook code
module:

Private Sub Workbook_Open()
With Me.Worksheets("Sheet1").ComboBox1
.AddItem "Cindy"
.AddItem "Kathy"
.AddItem "Sandy"
.ListIndex = 0
End With
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Somebody PLEASE help me figure out how to autopopulate a combobox (the
> control, not form) when opening an Excel sheet.
>
> I literally just want to fill the cboBox with a set of text values
> automatically when opening the document. This should be simple,
> right??? Thanks,
> Steve
>


 
Reply With Quote
 
spovolny@gmail.com
Guest
Posts: n/a
 
      3rd Jul 2007
On Jul 2, 2:08 pm, "Chip Pearson" <c...@cpearson.com> wrote:
> Try something like the following. It MUST be in the ThisWorkbook code
> module:
>
> Private Sub Workbook_Open()
> With Me.Worksheets("Sheet1").ComboBox1
> .AddItem "Cindy"
> .AddItem "Kathy"
> .AddItem "Sandy"
> .ListIndex = 0
> End With
> End Sub
>
> --
> Cordially,
> Chip Pearson
> Microsoft MVP - Excel
> Pearson Software Consultingwww.cpearson.com
> (email on the web site)
>
> <spovo...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > Somebody PLEASE help me figure out how to autopopulate a combobox (the
> > control, not form) when opening an Excel sheet.

>
> > I literally just want to fill the cboBox with a set of text values
> > automatically when opening the document. This should be simple,
> > right??? Thanks,
> > Steve


Perfect! Thanks Chip - really appreciate the help.

 
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
Re: Auto Populate a Combo Box based on the user selection of another Combo Box John W. Vinson Microsoft Access Forms 0 2nd Mar 2010 04:56 AM
Combo Box selection / AUTO POPULATE combo box in a different form kealaz@starbase74.com Microsoft Access Form Coding 2 14th Apr 2009 12:30 PM
Combo Box selection / AUTO POPULATE combo box in a different form kealaz Microsoft Access 0 13th Apr 2009 06:31 PM
populate combo box from worksheet tracktraining Microsoft Excel Programming 4 20th Feb 2009 01:03 AM
Populate a combo box from a worksheet with VBA =?Utf-8?B?SmFjaw==?= Microsoft Excel Programming 1 13th Jan 2006 12:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:58 PM.