您的位置:首页 > 编程语言 > VB

VB EXCEL 2007 TO 2003

2014-04-03 09:59 549 查看
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 200

End Sub


THAT ALL
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: