Sub Macro5()
'
' Macro5 Macro
' ºêÓÉ Tiger Chen ¼ÖÆ£¬Ê±¼ä: 2005-3-16
' '
ActiveSheet.Shapes.Range(Array("Rectangle 18", "Oval 19", "Text Box 20", _
"Rectangle 21" _
, "Text Box 22", "Rectangle 23", "Oval 24", "Text Box 25" _
, "Rectangle 26", "Text Box 27", "Rectangle 28", "Oval 29" _
, "Text Box 30", "Rectangle 31", "Text Box 32", "Rectangle 33")).Select
ActiveSheet.Shapes.Range(Array("Oval 34", "Text Box 35", "Rectangle 36", _
"Text Box 37" _
, "Rectangle 38", "Oval 39", "Text Box 40", "Rectangle 41" _
, "Text Box 42")).Select False
End Sub Sub tests()
ActiveSheet.Shapes.Range(Array("Rectangle 18", "Oval 19", "Text Box 20", _
"Rectangle 21" _
, "Text Box 22", "Rectangle 23", "Oval 24", "Text Box 25" _
, "Rectangle 26", "Text Box 27", "Rectangle 28", "Oval 29" _
, "Text Box 30", "Rectangle 31", "Text Box 32", "Rectangle 33", "Oval 34", "Text Box 35", "Rectangle 36", _
"Text Box 37" _
, "Rectangle 38", "Oval 39", "Text Box 40", "Rectangle 41" _
, "Text Box 42")).Select
End Sub
这是我录制和修改的代码,两段代码都能正确运行,不知道为什么当图形多时,录制时需要用到Select False。实际上数组函数Array并没有这个限制。 |