G
Guest
Using Excel 2003.
I have an array of button captions that I am using to loop through some of
the buttons on a pop-up control on a custom toolbar. The array is required in
several different procedures, so I would like a solution to avoid having to
declare it in each procedure. Normally, I would just loop through all of the
controls contained in the pop-up, but there are three buttons that need to be
handled different from the rest, so that solution doesn't work in this case.
My current code that I am using in each procedure is:
Dim ButtonNames() As Variant
ButtonNames = Array("Next Level", "All Levels", "Bottom Level", "Use
Siblings", _
"Same Level", "Same Generation", "Calc Level", "Include Selected", _
"Within Selected Groups", "Remove Unselected Groups")
My first thought was to try and declare it as a global constant as follows,
but that didn't work out so well:
Public Const ButtonNames as Variant = Array("Next Level", "All Levels", _
"Bottom Level", "Use Siblings", "Same Level", "Same Generation", _
"Calc Level", "Include Selected", "Within Selected Groups", _
"Remove Unselected Groups")
Any helpfully solutions that you could provide would be greatly appreciated.
-Cory
I have an array of button captions that I am using to loop through some of
the buttons on a pop-up control on a custom toolbar. The array is required in
several different procedures, so I would like a solution to avoid having to
declare it in each procedure. Normally, I would just loop through all of the
controls contained in the pop-up, but there are three buttons that need to be
handled different from the rest, so that solution doesn't work in this case.
My current code that I am using in each procedure is:
Dim ButtonNames() As Variant
ButtonNames = Array("Next Level", "All Levels", "Bottom Level", "Use
Siblings", _
"Same Level", "Same Generation", "Calc Level", "Include Selected", _
"Within Selected Groups", "Remove Unselected Groups")
My first thought was to try and declare it as a global constant as follows,
but that didn't work out so well:
Public Const ButtonNames as Variant = Array("Next Level", "All Levels", _
"Bottom Level", "Use Siblings", "Same Level", "Same Generation", _
"Calc Level", "Include Selected", "Within Selected Groups", _
"Remove Unselected Groups")
Any helpfully solutions that you could provide would be greatly appreciated.
-Cory