Go Back   Computer Forums > General Computing > Hardware
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 03-07-2005, 05:25 PM   #1
Baseband Member
 
Join Date: Jun 2004
Posts: 26
Unhappy Excel...PLEASE HELP!!!

I am trying to put a combo box in a userform on VB in Microsoft Excel. I have the data i want in the combo box on a spreadsheet, however i cannot use ControlSource to have more than one. For example i can use Customers!A15 to get data from that cell, however i cannot use Customers!A15:A40 to get data from all required cells. Anyone know how?? Any help will be very much appreciated.
__________________

jonworth is offline   Reply With Quote
Old 03-07-2005, 05:40 PM   #2
Baseband Member
 
Join Date: Jun 2004
Posts: 26
Default

have also tried the following in modules and combobox commands as suggested by a teacher at col. Why does it tell me that he had no idea what he was on about???

Private Sub UserForm2_Initalize()
' adds data to the spreadsheet

If init% = False Then
ComboBox1.AddItem ("Paris")
ComboBox1.AddItem ("Malaga")
ComboBox1.AddItem ("Alicante")
ComboBox1.AddItem ("Munich")
ComboBox1.AddItem ("Amsterdam")
ComboBox1.AddItem ("Barcalona")
ComboBox1.AddItem ("Prague")
ComboBox1.AddItem ("Dublin")
ComboBox1.AddItem ("Edinburgh")
ComboBox1.AddItem ("Belfast")
ComboBox1.AddItem ("Manchester")
ComboBox1.AddItem ("Birmingham")
ComboBox1.AddItem ("Heathrow")
ComboBox1.AddItem ("Vienna")
ComboBox1.AddItem ("Lisbon")
ComboBox1.AddItem ("Milan")
ComboBox1.AddItem ("Copenhagen")
ComboBox1.AddItem ("Moscow")
ComboBox1.AddItem ("Glasgow")
ComboBox1.AddItem ("Cardiff")
ComboBox1.AddItem ("Lyon")
ComboBox1.AddItem ("Ibiza")
ComboBox1.AddItem ("Rome")
ComboBox1.AddItem ("Mahon")
ComboBox1.AddItem ("Lanzarote")
ComboBox1.AddItem ("Tenerife")

If init% = True Then
End If
End Sub
Please help this is for coursework and cant find any help anywhere else. i need those countries on a combo box in vb userform
__________________

jonworth is offline   Reply With Quote
Old 03-07-2005, 05:57 PM   #3
Baseband Member
 
Join Date: Jun 2004
Posts: 26
Default

*Cities
jonworth is offline   Reply With Quote
Old 03-07-2005, 06:36 PM   #4
Baseband Member
 
Join Date: Jun 2004
Posts: 26
Default

anybody know...please desperate 4 this
jonworth is offline   Reply With Quote
Old 03-07-2005, 06:48 PM   #5
Fully Optimized
 
jack22's Avatar
 
Join Date: Feb 2005
Posts: 2,124
Default Re: Excel...PLEASE HELP!!!

dont quadruple post
__________________
Because of popular demand, the great almighty sig has been changed.



............cxxxxxxc|)::::::::::::> ................
jack22 is offline   Reply With Quote
Old 03-07-2005, 06:50 PM   #6
Baseband Member
 
Join Date: Jun 2004
Posts: 26
Default Re: Excel...PLEASE HELP!!!

ok sorry bout that mate just gotta say i found out a way now anyway. Was using ControlSource instead of RowSource Doh!!!
__________________

jonworth is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



All times are GMT -5. The time now is 03:10 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0