Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default overlapped functions in vba for excel

Hello All

I have written a vba app to get data from a device and display it on a
graph in excel. The data is fetched via the serial port using the Win32
communications api. These functions used are overlapped, hence the
other threads & applications run as normal during a relatively slow
communications.

Essentially the overall algorithm is:

cell =1
while cell < 100
if data available or timeout
place data or error in cell
cell++

This locks excel in the while loop, busy and cannot respond to user
commands. How do I put something in this loop to say ' check the rest
of excel needs'?

Thanks in anticipation.

Billy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default overlapped functions in vba for excel

Add

DoEvents

in each iteration of the loop.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"blinkots" wrote in message
...
Hello All

I have written a vba app to get data from a device and display it on a
graph in excel. The data is fetched via the serial port using the Win32
communications api. These functions used are overlapped, hence the
other threads & applications run as normal during a relatively slow
communications.

Essentially the overall algorithm is:

cell =1
while cell < 100
if data available or timeout
place data or error in cell
cell++

This locks excel in the while loop, busy and cannot respond to user
commands. How do I put something in this loop to say ' check the rest
of excel needs'?

Thanks in anticipation.

Billy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default overlapped functions in vba for excel

Bob Phillips wrote:
Add

DoEvents

in each iteration of the loop.

Thanks .. this did help.

Billy
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
How to convert cell formula functions to code functions Adnan Excel Discussion (Misc queries) 1 October 1st 08 08:30 PM
old excel file overlapped with new excel file bindurajeesh Excel Discussion (Misc queries) 5 August 13th 08 02:02 PM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Public Functions As Worksheet Available Functions Steve King Excel Programming 3 February 12th 05 07:55 PM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM


All times are GMT +1. The time now is 01:24 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"