Sub 宏2()
'
' 宏2 宏
'
' 快捷键: Ctrl+b
'
For i = 1 To 10
Workbooks.Open Filename:= _
"d:\总股本\HKSHRSTRUCT_EXT_ (
"+ CStr(i) + ").xls"
Range("G8").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Application.CutCopyMode = False
Selection.FormulaR1C1 = "9999999999"
ActiveWorkbook.Save
ActiveWindow.Close
Windows("工作簿1").Activate
next
End Sub
我这段程序希望能够找到EXCEL中的空值,并把它们替换为“9999999999”,请问如果表格中没有空值,它就停止并报错。该怎么修改这个程序呢?