loop through combo box

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

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

resolvedResolved · Medium Priority · Version 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:

Switching Between Spreadsheets

As the Alt+Tab key switches between loaded applications or files, Ctrl+Tab switches between loaded or open Excel files. Hold down the Ctrl key until you have tabbed to the correct spreadsheet.

View all Excel hints and tips


Server loaded in 0.08 secs.