Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 590
Default How do I initialize a ComboList Box control from a range in an ex.

I am trying to write a simple data base application which displays for
selection a range of a spreadsheet. Trying to set RowSource from properties
or code. Never seem to be able to code the correct "type".
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default How do I initialize a ComboList Box control from a range in an ex.

Hi ken,

ken wrote:
I am trying to write a simple data base application which displays for
selection a range of a spreadsheet. Trying to set RowSource from
properties or code. Never seem to be able to code the correct "type".


I'm not exactly clear what you're trying to accomplish, but the following
code will set the RowSource of a ComboBox (named "cboUsers" in this case) to
the range A1:A5 on Sheet1:

Private Sub UserForm_Initialize()
cboUsers.RowSource = "Sheet1!A1:A5"
End Sub

To do it at design time, you can set the property to Sheet1!A1:A5.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]

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
Initialize variable hotherps[_128_] Excel Programming 2 August 26th 04 02:38 PM
need form to initialize without closing bruce forster Excel Programming 2 April 21st 04 11:57 PM
adding reference-to-range control to excel range Nir Sfez Excel Programming 1 March 2nd 04 06:11 PM
Available printers in a dropdown-combolist? NorTor Excel Programming 2 September 7th 03 05:21 PM
Initialize data in new row? Ken[_12_] Excel Programming 1 August 9th 03 05:13 PM


All times are GMT +1. The time now is 12:30 AM.

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

About Us

"It's about Microsoft Excel"