Hi Guys, I have asked this question in another forum but did not receive and answer. I also ck'd FAQ, found the question from 3 differnt subscribers but not answers. And since I always get GREAT answers here I thought what the heck it can't hurt to ask.
I am receiving 2 error msgs:
[blue] Data file 'X:\Pre-Sale Inspections\outgoing\AT_20060320_042005.XML' not found would you like to connect to 'X:\Pre-Sale Inspections\outgoing\AT_20060320_042005.XML' instead?[/blue]
Weather I click yes/no a second msg appears. Dialog box [blue]'Pls Enter MS JET OLE DB Initialization Information'[/blue]
The msg is occruing on the last line of code (.Refresh BackgroundQuery:=False). The msg just started appearing when I changed the file path. I moved the file from drive 'M' to drive 'X'
Here is the code:
With ActiveSheet.QueryTables.Add(Connection:=Array( _
"OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=X:\Pre-Sale Inspections\outgoing\" & TodaysFile _
, _
";Mode=Share Deny Write;Extended Properties=""HDR=YES;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB
atabase" _
, _
" Password="""";Jet OLEDB:Engine Type=35;Jet OLEDB
atabase Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bul" _
, _
"k Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet " _
, _
"OLEDB
on't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False" _
), Destination:=Range("A1"))
.CommandType = xlCmdTable
.CommandText = Array("Sheet1$")
.Name = TodaysFile
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.SourceDataFile = _
"X:\Pre-Sale Inspections\outgoing\" & TodaysFile
.Refresh BackgroundQuery:=False
End With
OBTW: TodaysFile is defined globally.
Does anyone have any idea why I am getting this msg.
Thanx
Trudye
I am receiving 2 error msgs:
[blue] Data file 'X:\Pre-Sale Inspections\outgoing\AT_20060320_042005.XML' not found would you like to connect to 'X:\Pre-Sale Inspections\outgoing\AT_20060320_042005.XML' instead?[/blue]
Weather I click yes/no a second msg appears. Dialog box [blue]'Pls Enter MS JET OLE DB Initialization Information'[/blue]
The msg is occruing on the last line of code (.Refresh BackgroundQuery:=False). The msg just started appearing when I changed the file path. I moved the file from drive 'M' to drive 'X'
Here is the code:
With ActiveSheet.QueryTables.Add(Connection:=Array( _
"OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=X:\Pre-Sale Inspections\outgoing\" & TodaysFile _
, _
";Mode=Share Deny Write;Extended Properties=""HDR=YES;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB
, _
" Password="""";Jet OLEDB:Engine Type=35;Jet OLEDB
, _
"k Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet " _
, _
"OLEDB
), Destination:=Range("A1"))
.CommandType = xlCmdTable
.CommandText = Array("Sheet1$")
.Name = TodaysFile
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.SourceDataFile = _
"X:\Pre-Sale Inspections\outgoing\" & TodaysFile
.Refresh BackgroundQuery:=False
End With
OBTW: TodaysFile is defined globally.
Does anyone have any idea why I am getting this msg.
Thanx
Trudye