[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

populate cells from combo box

Posted on 2014-04-14
5
Medium Priority
?
175 Views
Last Modified: 2014-05-11
I have a combo box that the user selects a value, once the value is select i would like to populate the cells from the the combo box columns i am currently using a loop,but i would to   accomplished this in one pass.
let's say range("ao17: at17") must be populated from cbobox column 1 to 6
0
Comment
Question by:Svgmassive
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 36

Accepted Solution

by:
Kimputer earned 2000 total points
ID: 39998695
Try this:

Private Sub ComboBox1_Change()

    Range("ao17").Value = ComboBox1.List(ComboBox1.ListIndex, 0)
    Range("ap17").Value = ComboBox1.List(ComboBox1.ListIndex, 1)
    Range("aq17").Value = ComboBox1.List(ComboBox1.ListIndex, 2)
    Range("ar17").Value = ComboBox1.List(ComboBox1.ListIndex, 3)
    Range("as17").Value = ComboBox1.List(ComboBox1.ListIndex, 4)
    Range("at17").Value = ComboBox1.List(ComboBox1.ListIndex, 5)
    
End Sub

Open in new window

0
 

Author Comment

by:Svgmassive
ID: 40001060
kimputer not exactly what i am looking for
0
 
LVL 36

Expert Comment

by:Kimputer
ID: 40002412
In that case, more details would be nice. As you can see, all selected items populate the cells you mentioned in one go.
0
 

Author Comment

by:Svgmassive
ID: 40025646
can this be done in one line of code? i would  rather use a loop which i am currently using if this can't be accomplished
0
 
LVL 36

Expert Comment

by:Kimputer
ID: 40025724
Then the answer is no
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question