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