|
4#
楼主 |
发表于 2016-5-24 17:27:05
|
只看该作者
代码如下:
Option Explicit
Public COUNTER As Long
Sub Macro1()
'
' Macro1 Macro
' 宏由 laola1000 录制,时间: 2009-7-19
'
'
Range("A1:K34").Select
Selection.Copy
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Sheets("Sheet2").Select
Application.CutCopyMode = False
Sheets("Sheet2").Copy
ActiveWorkbook.saveAs Filename:= _
ThisWorkbook.Path & "\附件\附件(" & [D2] & "-" & [K53] & "页).xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Range("A1").Select
ActiveWindow.Close
Sheets("Sheet1").Select
Range("A1").Select
End Sub
Public Function PrintTime(delay As Single)
Dim Start As Single
Start = Timer
Do While Timer < Start + delay
DoEvents
Loop
End Function
|
|