Click here to Skip to main content
15,888,129 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i have created a excel addin which is connecting with database.
Fills data from database.
When it is bringing data from database that time we can not do any operation in excel sheet.
but i want to do some operation.

Please help me.
Posted

1 solution

You may use the BackgroundWorker class.

VB
Imports System.ComponentModel

Friend WithEvents BW As BackgroundWorker

Sub Start()

    Dim task As Object = "Hello, World!"

    BW = New BackgroundWorker

    BW.RunWorkerAsync(task)

End Sub

Private Sub BW_DoWork(sender As Object, e As DoWorkEventArgs) Handles BW.DoWork

    e.Result = e.Argument

End Sub

Private Sub BW_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles BW.RunWorkerCompleted

    MsgBox(e.Result)

End Sub
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900