Display Subset element to a specific cell

Post Reply
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Display Subset element to a specific cell

Post by bunchukokoy »

hi guys!

good day!

do you have any idea how i may execute this one?!

Private Sub Workbook_Open()

y = Run("SUBSIZ", "Period", "WeeklySalesReport") 'Get Size of subset Zeroout
shVersioning.cmbSYear.Clear
For i = 1 To y
shVersioning.cmbSYear.AddItem Format(CDate(Mid(Run("SUBNM", "Period", "WeeklySalesReport", i, "date & day"), 12, 10)), "mmm dd, yyyy") & " - SUN"
Next i

End Sub

These elements from the subset "WeeklySalesReport" will be populated into a combo box.
But I want this one. When I select a particular list on that combox box I want to display the element on cell A1.
I'm just lacking an idea.

Thanks!

bunchukokoy
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Re: Display Subset element to a specific cell

Post by bunchukokoy »

guys,

I got it.

Private Sub cmbSYear_Change()
dimension = """Period"""
subset = """WeeklySalesRep"""
alias = """date & day"""
Range("J9").Formula = "=SUBNM(" & dimension & "," & subset & "," & cmbSYear.ListIndex + 1 & "," & alias & ")"
Calculate
End Sub

Thanks! :D
Post Reply