Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Threads ... possible in VBA
Hi all,
I would like to be able to have a separate thread running while I execute an API call - specifically, "URLDownloadFile". I want to be able to implement a callback function such that as a file is being downloaded I can give users feedback on progress. The API is synchronous, therefore VBA blocks until the operation is complete ... this is not what I want. Has anyone come across similar problems, and if so how how did you overcome it? This group has not let me down so far ... I need your brains!! Cheers |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Threads ... possible in VBA
Hello SkylineGTR, Here is a link to discussion I think will help you out. It discusses using an API timer to switch between the download operation and the VB code. The VBA AddressOf operator makes using API callbacks easy. This may not be the ideal solution, but sometimes close enough will do. Here's the link http://www.vb-forum.com/showthread.php?t=226495 Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=484599 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Threads ... possible in VBA
Hi Ross,
Many thanks for your reply. I tried using WinAPI timers, and all seemed well until I called I "URLDownloadFile" API. The timer stopped until URLDownloadFile had finished, then carried on again ... hmm ... any ideas? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Threads ... possible in VBA
Hello SkylineGTR, I would need to see your code. With API calls and callbacks it can be dangerous to hazard a guess. Post if you can, if not my email is . Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=484599 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
own threads | Charts and Charting in Excel | |||
how do i view my threads | Excel Discussion (Misc queries) | |||
how do i view my old threads | Excel Discussion (Misc queries) | |||
Sorry for the 3 threads! My bad... | Excel Worksheet Functions | |||
a way to get all the threads | Excel Discussion (Misc queries) |