REF:VBA宏来批量更新同一位置的多个文件

时间:2014-10-23 20:09:16

标签: excel-vba vba excel

参考:VBA macro to mass update multiple files in same location

继续得到这个错误并且不知道为什么,基本上试图打印出大量文档,但是这就是阻止它的内容。

Option Explicit

 Public Function CreateFile(filePath As String, fileName As String) As File
   Dim fileObj As File
   Set fileObj = New File

   fileObj.InitiateProperties filePath:=filePath, fileName:=fileName ' this is where it stops......
   Set CreateFile = fileObj
 End Function

 Sub Initialize(Optional bool As Boolean)
   Application.ScreenUpdating = False
   Application.DisplayAlerts = False
 End Sub

 Public Sub Terminate(Optional bool As Boolean)
   Application.DisplayAlerts = True
   Application.ScreenUpdating = True
 End Sub 

也希望打印出特定的表格,但我可以自己处理。

0 个答案:

没有答案