I recorded a macro and then used the code.
I can change one dimension only. It comes up with error when there are more than 1 dimension is selected
That's because a program does exactly what it is designed for and nothing more. If it should handle single and multiple selected items, the code should be changed so it can handle that. In this case you should probably add a check to make sure every selected item is a dimension and then create a "for" loop that changes each selection item.
What do you have now?
Retrieving data ...