Excel icon

Return Command bar info in a VBA function

In the previous post I showed a simple sub for listing most of the CommandBar properties. But we can also return this information using a function.

You might do this (in Excel versions prior to 2007) when working with a command bar and need to view its properties before making a change. Here is a function that returns a string array of properties for each Command Bar Object.

Continue Reading »

VBA icon

Finding values in an array without looping

If you need to find a value in an array, you might be inclined to loop through the array and using a function like Instr to match each value in the array against the selected value to see if it exists.

Until recently, I would have done the same thing (breaking it out into its own function, of course). But recently I discovered another way to do it that doesn't require looping, and thought I'd share.

Continue Reading »

learn excel dashboards