Thread: Sql Refresh
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Sql Refresh

a bug in ADO prevents you from Querying an open workbook.
(it may work for a while..but excel WILL crash)

see
http://support.microsoft.com?kbid=319998

BUG: Memory leak occurs when you query an open Excel worksheet by using
ActiveX Data Objects (ADO)



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


Adul wrote in message
:

Hi All,


I want to have the code for .Connection = ???? to
represent ActiveWorkbook sheets("Temp 1")in the following
part;


With Sheets("TempData").Range("a1").QueryTable
.Connection = ????
.CommandText = myCmd
.Refresh BackgroundQuery:=False
End With


Thanks,
Adul