View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
x taol x taol is offline
external usenet poster
 
Posts: 101
Default get data and field name using querytables

Set rs = db.OpenRecordset("select * from tbl")
Set qt = sht.QueryTables.Add(rs, sht.[a1])
qt.Refresh 1

in that case, field name occur, that good. but a name is
made(ex:ExternalData1), that no good. And CopyFromRecordset method
doesn't bring the field name.

i want to write in that sheet with only data and field name using
querytables.



*** Sent via Developersdex http://www.developersdex.com ***