Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default asynchron querytable refreshing

dear all, my problem is the following:
i'm developping an excel 2007 managed addin but this code segment doesn't
work in an asynchron way ( copied from ThisAddIn class ) :

Dim i_sheet As Worksheet = Me.Application.ActiveWorkbook.ActiveSheet

Try
Dim i_cstring As String = "OLEDB;" &
_editor.cb_sources.ComboBox.SelectedValue
_ActiveQueryTable = i_sheet.QueryTables.Add(i_cstring,
i_sheet.Range("A1"), p_commandText)
_ActiveQueryTable.CommandType = XlCmdType.xlCmdSql
_ActiveQueryTable.BackgroundQuery = True
_ActiveQueryTable.Refresh()

Catch ex As Exception
MsgBox(ex.Message)
End Try

it works fine but the application (excel) doesn't remain responsive, have to
wait till the db sends back the resultset. Could somebody help me?
thanks in advance,
m
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New QueryTable? Neily[_3_] Excel Programming 1 June 8th 07 01:28 PM
another querytable.add question Gary Keramidas Excel Programming 2 May 30th 07 03:17 PM
web, querytable &jpg TomR Excel Programming 0 November 4th 05 04:30 PM
Querytable refreshing on a protected spreadsheet CDConsultant Excel Programming 1 December 8th 04 10:39 PM
Querytable Ben.c Excel Programming 4 December 3rd 03 09:11 AM


All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"