VB EXCEL 2007 TO 2003

来源:互联网 发布:java base64 中文乱码 编辑:程序博客网 时间:2024/05/29 04:15


Private Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)Public Sub translateFormat(strS1 As String, strD1 As String, strPath As String)'    Dim xlApp As New Excel.Application    Dim xlBook As New Excel.Workbook        Set xlApp = CreateObject("Excel.Application")    xlApp.Visible = False    Set xlBook = xlApp.Workbooks.Open(strPath & strS1)    xlApp.DefaultSaveFormat = xlExcel8    xlApp.DisplayAlerts = False    xlBook.CheckCompatibility = False    xlBook.SaveAs strPath & strD1, FileFormat:=xlExcel8        xlBook.Close    Set xlBook = Nothing    xlApp.Quit    Set xlApp = Nothing    Kill strPath + strS1    Sleep 200End Sub



THAT ALL

0 0
原创粉丝点击