If I set up background query refresh as false then how will i get the data based on query please.
Following is the code i am using to extract data
With ActiveSheet.ListObjects.Add(SourceType:=0, Source:=Array( _
"OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;Data Source=dbname" _
, _
"Jet OLEDB:Bypass UserInfo Validation=False" _
), Destination:=Range("$A$1")).QueryTable
.CommandType = xlCmdTable
.CommandText = Array("SELECT * From [BPC_1] WHERE Region like '" & Reg & "' AND [Zone] like '" & zn & "' AND [Country] like '" & cty & "'AND [Fn L1] like '" & fn1 & "'AND [Fn L2] like '" & fn2 & "'AND [Fn L3] like '" & fn3 & "'AND [Geography] like '" & geo & "' AND [Cate L4] like '" & cat & "'")
.PreserveFormatting = True
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.SourceDataFile = _
"\\pnccfsdg01\Dubai_AC_Finance\Dubai AC Controllership\GL Close Accountants\vg\GOE-APAC.accdb"
.ListObject.DisplayName = "Table_ExternalData_14"
.Refresh BackgroundQuery:=True
End With