Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

loop through combo box

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Loop through Combo box options to change data in OLAP cube

Loop through Combo box options to change data in OLAP cube

ResolvedVersion 2003

John has attended:
Excel VBA Intro Intermediate course

Loop through Combo box options to change data in OLAP cube

I have a spreadsheet that uses combo boxes to change the options in an OLAP cube so when you change selections the chart and data subsequently change.

I would like to create a macro that loops through all the options in one of my combo boxes and produces charts for each selection in a seperate document.

I have recorded changing the combo box and I can only see the application.run of my macro assigned to the combo box.

Note: there is no form on this spreadsheet, the combo boxes are on the sheet itself.

Thanks

John

RE: Loop through Combo box options to change data in OLAP cube

Hi John, thanks for your query. The macro recorder in 2003 will not translate your worksheet combobox selections into code. You'll need to write this programmatically. Look at our training code for the "Delete Items" subroutine written to flush out the dependent dropdowns on a form. You will need to modify this to loop through your Combo box, dump each successive item into a variable then pass it into your charting code.

Hope this helps,

Anthony

Sat 1 Oct 2011: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Copying Formulae Quickly

There is a quicker way of copying a formula down a column.

Just point and double click on the black autofill handle in the right hand corner of a cell.

This will work providing you have some data in the column to the left of the column.

Sandy

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.