View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
urkec urkec is offline
external usenet poster
 
Posts: 131
Default Run Time Error 1004: Application-Defined or Object-Defined Error

What values do you get if you

MsgBox sSql
MsgBox sConn

before

==Here is where the error is happening:

Set oQt = sh.QueryTables.Add(Connection:=sConn, _
Destination:=sh.Range("A8"), _
SQL:=sSql)


--
urkec