Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Auto Populate Combo Box When Opening a Worksheet

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Auto Populate Combo Box When Opening a Worksheet

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)


wrote in message
ups.com...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Auto Populate Combo Box When Opening a Worksheet

On Jul 2, 2:08 pm, "Chip Pearson" 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)

wrote in message

ups.com...

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for a function that will populate opening a worksheet or t Olivia Excel Worksheet Functions 2 April 22nd 10 07:38 PM
Auto populate one worksheet from other worksheets mab1963 Excel Worksheet Functions 4 February 29th 08 03:21 PM
using a worksheet range to populate a combo box in excel Kev[_7_] Excel Programming 37 March 30th 07 07:56 PM
Best way to populate worksheet from 2 combo boxes jswasson Excel Worksheet Functions 0 July 7th 06 01:21 PM
Populate a combo box from a worksheet with VBA Jack Excel Programming 1 January 13th 06 12:44 PM


All times are GMT +1. The time now is 07:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"