一、下面录制的是选择性粘贴的代码.
1、下面代码中请回答select是方法还是属性?Copy是方法还是属性 答:select、copy是方法
2、Selection.PasteSpecial , Paste=xlPasteAll;Operation:=xlMultiply 一句中有三处错误,请找出来改正。注:selection是表示正在选取的单元格对象。
答:第一处错误:“PasteSpecial , Paste”中间的应用空格隔开;第二处错误:“Paste=xlPasteAll ”中间应为:= ;第三处错误:“Paste=xlPasteAll;Operation”中间应用逗号隔开。 1. Sub Macro1() 2. ' 3. ' Macro1 Macro 4. ' 宏由 Lenovo User 录制,时间: 2012-1-17 5. 6. Range("C21:C25").Select 7. Selection.Copy 8. Range("E21").Select 9. Selection.PasteSpecial , Paste=xlPasteAll;Operation:=xlMultiply 10. End Sub 二、下面的代码是定位空单元格并删除,该句代码中哪些是对象,哪些方法,哪些是属性?请简述下面一句代码的结构。 1. Range("a:a").SpecialCells(xlCellTypeBlanks).EntireRow.Delete 答:Range("a:a")是对象;SpecialCells(xlCellTypeBlanks)是对象; EntireRow是对象;Delete是方法 |