<

[vba] Export Excel to Access > vb6.0

본문 바로가기

vb6.0

[vba] Export Excel to Access

익명
2022-09-19 10:00 119 0
  • - 첨부파일 : Export Excel to Access.zip (33.5K) - 다운로드

본문

Sub program1472()
    Dim acc As Object
    Set acc = CreateObject("Access.Application")
    acc.OpenCurrentDatabase ThisWorkbook.Path & "\DB.accdb"
    acc.DoCmd.TransferSpreadsheet _
            TransferType:=0, _
            SpreadSheetType:=acSpreadsheetTypeExcel12Xml, _
            TableName:="program1472", _
            Filename:=Application.ActiveWorkbook.FullName, _
            HasFieldNames:=True, _
            Range:="tem$A1:B10"
    acc.CloseCurrentDatabase
    acc.Quit
    Set acc = Nothing
End Sub

댓글목록0

등록된 댓글이 없습니다.
게시판 전체검색