SunQuest
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 29th, 2003, 12:41 AM
maya maya is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 29 maya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
excel Macro Combobox

Hi, ive a this excel worksheet that contain data and another worksheet that has the user interface...now i would like to create a combobox that contains the list of data from the data worksheet and am wondering how to do that....pls help. Thanx

Reply With Quote
  #2  
Old May 29th, 2003, 03:29 AM
barkley barkley is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 4 barkley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Highlight the data you would like in your combobox, then in the 'Name Box' (top left of your screen) type in a name for your list of data, for example 'list'.

Go to your input sheet, right click on your combo box and in Format control click on the control tab. In input range type =list and hey presto.

Hope that helped.

Reply With Quote
  #3  
Old May 29th, 2003, 03:40 AM
maya maya is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 29 maya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
format control

ive tried that but the problem is in the format control window there is no control tab...any other options?

Reply With Quote
  #4  
Old May 29th, 2003, 05:10 AM
epl epl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Dublin
Posts: 413 epl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 18 sec
Reputation Power: 8
The approach to use depends on which combobox you've used - is it the one from the control toolbox toolbar or the one from the forms toolbar?

I think the approach above works for the forms toolbar one. For the control toolbox one you need to right click, view properties and set the listFillRange property to your list as above

Reply With Quote
  #5  
Old May 29th, 2003, 05:20 AM
barkley barkley is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 4 barkley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You could use the Excel Validation Option instead.
Instead of using a combo box, select a cell and go to Data > Validation.
Select Allow 'List' and set your source to be =list (or whatever you labelled your range as).
Is this acceptable?

Reply With Quote
  #6  
Old May 29th, 2003, 06:59 PM
maya maya is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 29 maya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ok...but

ok..ive tried that and it works but unless the list is in the same sheet rite but in my case the list is in a different sheet, so how to do the fill range?

Reply With Quote
  #7  
Old May 30th, 2003, 04:17 AM
epl epl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Dublin
Posts: 413 epl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 18 sec
Reputation Power: 8
yoan write a piece of code to fill / refresh the list in the worksheet's activate event

do you need help with that?

btw, the items don't need to be on the same sheet on my excel... for either type of combo box

Last edited by epl : May 30th, 2003 at 04:23 AM.

Reply With Quote
  #8  
Old June 1st, 2003, 07:10 PM
maya maya is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 29 maya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
yes

yup, i need help with that, hope u could show me how to do it

Reply With Quote
  #9  
Old September 26th, 2003, 09:21 PM
aespinosajr aespinosajr is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 aespinosajr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Wink

Maya,


This may work:

On the ListFillRange type

Sheet2!A1:A4

Sheet2! (Change Sheet2 to your worksheet's name followed by the exclamation mark... and change the A1:A4 to the cells range were your values are for the combobox)

Hope this help

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > excel Macro Combobox


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway