VB EXCEL 2007 TO 2003

前端之家收集整理的这篇文章主要介绍了VB EXCEL 2007 TO 2003前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


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

原文链接:https://www.f2er.com/vb/258113.html

猜你在找的VB相关文章