Workbooks.OpenDatabase - Method

     

    This program enables to:

  • Import the data from Access Table to Excel by creating PIVOTCATCHE
  •  

  • Create Pivot table
  •  

    Sub ImportData_From_Access_To_Excel()
    Dim filename As String
    filename = Application.GetOpenFilename()
    MsgBox filename
    Workbooks.OpenDatabase filename:=filename, _
    CommandText:="Select Item,Location,Qty from Sales", _
    CommandType:=xlCmdTable, _
    BackgroundQuery:=False, _
    ImportDataAs:=xlPivotTableReport
    End Sub



    Download The Workbook