Connection/Import Error msgs

T

Trudye

I am receiving 2 error msgs:
1. Data file 'X:\Pre-Sale Inspections\outgoing\AT_20060320_042005.XML
not found would like to connect to 'X:\Pre-Sal
Inspections\outgoing\AT_20060320_042005.XML' instead?

Weather I click yes/no a second msg appears. Dialog box 'Pls Enter M
JET OLE DB Initialization Information'

The msg is occruing on the last line of code (.Refresh). The msg jus
started appearing when I changed the file path

With ActiveSheet.QueryTables.Add(Connection:=Array( _
"OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password="""";Use
ID=Admin;Data Source=X:\Pre-Sale Inspections\outgoing\" & TodaysFile _
, _
";Mode=Share Deny Write;Extended Properties=""HDR=YES;"";Je
OLEDB:System database="""";Jet OLEDB:Registry Path="""";Je
OLEDB:Database" _
, _
" Password="""";Jet OLEDB:Engine Type=35;Jet OLEDB:Databas
Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Globa
Bul" _
, _
"k Transactions=1;Jet OLEDB:New Database Password="""";Je
OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Je
" _
, _
"OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compac
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 Wit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top