Prabhakaran_Karuppaih
New Member
- Joined
- May 3, 2021
- Messages
- 11
- Office Version
- 365
- 2016
- Platform
- Windows
- Web
Why am I getting the following Error Message:
The Query 'Evidentials' was not found.
Recorded Code...
The Query 'Evidentials' was not found.
VBA Code:
Application.CutCopyMode = False
ActiveWorkbook.Worksheets.Add
With ActiveSheet.ListObjects.Add(SourceType:=0, Source:= _
"OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=Evidentials;Extended Properties=""""" _
, Destination:=Range("$A$1")).QueryTable
.CommandType = xlCmdSql
.CommandText = Array("SELECT * FROM [Evidentials]")
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.SourceConnectionFile = _
"C:\Users\P.Selvasundarapandi2\Desktop\Query - EvidentialsTable.odc"
.ListObject.DisplayName = "Table_Query___EvidentialsTable1"
.Refresh BackgroundQuery:=False
End With
Recorded Code...