以下是引用雨狐在2009-12-9 8:28:00的发言:
Sub time() If Not [b1] Then Sheet1.Shapes("button 1").DrawingObject.Caption = "运行": Exit Sub Application.OnTime Now() + TimeValue("0:0:001"), "sheet1.add" VBA.DoEvents End Sub Sub main() [b1] = Not [b1] Sheet1.Shapes("button 1").DrawingObject.Caption = "运行中..." Call time End Sub Sub add() If [b1] Then Dim arr, i%, t For i = 1 To [a65536].End(xlUp).Row arr = Split(Cells(i, 1), ",") Sheets("1").[a1].Resize(UBound(arr) + 1, 1) = Application.Transpose(arr) t = MsgBox("已复制第" & i & "行,新复制数据将覆盖以前数据,确认吗?", vbYesNo + 64, "提示") If t = vbNo Then Exit Sub Next End Sub 请版主改为这样可以吗???? |