How can I refer to a Combo box using a variable?
I have a subroutine that I pass a managers name to and it figures out using SQL who is under them to draw an Org chart.
I have 4 combo boxes called cboReport1, cboReport4, cboReport4, cboReport4
As you drill down to each box it shows the people that report "To" the one above them in a hierarchy manner.
So I need to not only get the List count for any particular combox box but also get the items in it.
I would rather not use a Select case with 4 items to determine which one I need a lot of extra code.
My "ReportTo" variable will contain the words “Report1” or “Report2” etc depending whihc one is being used at the time.
I tried this from another site but it’s no good in Powerpoint VBA.
for b = 0 to Me.(ReportTo).ListCount – 1
----
This is what I need it to look like somehow
DougP
I have a subroutine that I pass a managers name to and it figures out using SQL who is under them to draw an Org chart.
I have 4 combo boxes called cboReport1, cboReport4, cboReport4, cboReport4
As you drill down to each box it shows the people that report "To" the one above them in a hierarchy manner.
So I need to not only get the List count for any particular combox box but also get the items in it.
I would rather not use a Select case with 4 items to determine which one I need a lot of extra code.
My "ReportTo" variable will contain the words “Report1” or “Report2” etc depending whihc one is being used at the time.
I tried this from another site but it’s no good in Powerpoint VBA.
for b = 0 to Me.(ReportTo).ListCount – 1
Code:
For b = 0 To Me.cboReport3.ListCount – 1
If Me.cboReport3.List(b) <> rst!Name Then < I need to get these values for any of the 4 combo boxes when I come in here
Next
This is what I need it to look like somehow
Code:
For b = 0 To Me.”ReportTo”.ListCount – 1
If Me. ”ReportTo”(b) <> rst!Name
DougP