Hi Experts,
I recorded a macro to clear all active option buttons from my worksheet, but I was wondering if someone could help me do this in a couple of lines:
ActiveSheet.Shapes.Range(Array("Option Button 53")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$8"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 55")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$8"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 60")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$9"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 61")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$9"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 66")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$15"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 67")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$15"
.Display3DShading = True
End With
ActiveWindow.SmallScroll Down:=9
ActiveSheet.Shapes.Range(Array("Option Button 69")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$19"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 70")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$19"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 72")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$20"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 73")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$20"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 75")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$26"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 76")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$26"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 78")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$30"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 79")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$30"
.Display3DShading = True
End With
ActiveWindow.SmallScroll Down:=15
ActiveSheet.Shapes.Range(Array("Option Button 81")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$33"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 82")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$33"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 84")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$36"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 85")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$36"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 87")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$42"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 88")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$42"
.Display3DShading = True
End With
ActiveWindow.SmallScroll Down:=6
ActiveSheet.Shapes.Range(Array("Option Button 90")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$48"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 91")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$48"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 93")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$54"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 94")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$54"
.Display3DShading = True
End With
I recorded a macro to clear all active option buttons from my worksheet, but I was wondering if someone could help me do this in a couple of lines:
ActiveSheet.Shapes.Range(Array("Option Button 53")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$8"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 55")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$8"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 60")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$9"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 61")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$9"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 66")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$15"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 67")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$15"
.Display3DShading = True
End With
ActiveWindow.SmallScroll Down:=9
ActiveSheet.Shapes.Range(Array("Option Button 69")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$19"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 70")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$19"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 72")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$20"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 73")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$20"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 75")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$26"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 76")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$26"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 78")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$30"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 79")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$30"
.Display3DShading = True
End With
ActiveWindow.SmallScroll Down:=15
ActiveSheet.Shapes.Range(Array("Option Button 81")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$33"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 82")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$33"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 84")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$36"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 85")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$36"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 87")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$42"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 88")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$42"
.Display3DShading = True
End With
ActiveWindow.SmallScroll Down:=6
ActiveSheet.Shapes.Range(Array("Option Button 90")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$48"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 91")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$48"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 93")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$54"
.Display3DShading = True
End With
ActiveSheet.Shapes.Range(Array("Option Button 94")).Select
With Selection
.Value = xlOff
.LinkedCell = "$XFC$54"
.Display3DShading = True
End With