Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Tough One: displayalerts = false while OUTSIDE VBA

Questions:
1. Can anyone think of a way to disable alerts on background queries when
the Excel application is in control. (please see below before answering that
I should set displayalerts = false).
2. Is there a timeout property that can be set on a web query.

This might seem a bit arcane, but is quite critical to a web data capture
routine. I need to turn off alerts WHILE excel, NOT vba is in control of
operations.

I have a vba routine that generates potentialy thousands of web queries in a
workbook. Madness I know but there is method. These queries run massively
quicker when they are performed as background queries - ie. once excel gets
back in control when the vba routine that built the queries has finished. I
have a timer running (ported from vb in an activex wrapper) that monitors
the progress of the queries, then runs some clean up routines when
everything has been completed.

Problems a
1. If there is an error at the server or in the query, Excel displays an
alert. VBA is not running at this point other than the periodic timer
routine, so displayalerts = false makes no difference to the error message
being displayed. Excel help has the following to say about displayalerts: If
you set this property to False, Micorosoft Excel sets this property to True
when the code is finished, unless you are running cross process code.
2. If the queries take too long, I get a time out error, also leading to
problem 1. And, once the errors start, they are hard to stop since the app
is halted for the error, meaning data returns are probably creating errors.

Finally, having spent ages trying to work out a robust timer solution in
vba, akin to the vb timer, I'll post the activex solution in the next few
days for general usage. If anyone would like to give it a whirl in the
meantime for a bit of testing, please let me know.

Thanks in advance,

Robin Hammond
www.enhanceddatasystems.com


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Tough One: displayalerts = false while OUTSIDE VBA

Hi Robin
AFAIK you can't set this property to False outside VBA. As I'm not
using Web queries, don't they have a setting to omitt error messages?

--
Regards
Frank Kabel
Frankfurt, Germany


Robin Hammond wrote:
Questions:
1. Can anyone think of a way to disable alerts on background queries
when the Excel application is in control. (please see below before
answering that I should set displayalerts = false).
2. Is there a timeout property that can be set on a web query.

This might seem a bit arcane, but is quite critical to a web data
capture routine. I need to turn off alerts WHILE excel, NOT vba is in
control of operations.

I have a vba routine that generates potentialy thousands of web
queries in a workbook. Madness I know but there is method. These
queries run massively quicker when they are performed as background
queries - ie. once excel gets back in control when the vba routine
that built the queries has finished. I have a timer running (ported
from vb in an activex wrapper) that monitors the progress of the
queries, then runs some clean up routines when everything has been
completed.

Problems a
1. If there is an error at the server or in the query, Excel displays
an alert. VBA is not running at this point other than the periodic
timer routine, so displayalerts = false makes no difference to the
error message being displayed. Excel help has the following to say
about displayalerts: If you set this property to False, Micorosoft
Excel sets this property to True when the code is finished, unless
you are running cross process code.
2. If the queries take too long, I get a time out error, also leading
to problem 1. And, once the errors start, they are hard to stop since
the app is halted for the error, meaning data returns are probably
creating errors.

Finally, having spent ages trying to work out a robust timer solution
in vba, akin to the vb timer, I'll post the activex solution in the
next few days for general usage. If anyone would like to give it a
whirl in the meantime for a bit of testing, please let me know.

Thanks in advance,

Robin Hammond
www.enhanceddatasystems.com


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Tough One: displayalerts = false while OUTSIDE VBA

Frank,

I really hope so. I just can't find it.

Robin Hammond
www.enhanceddatasystems.com

"Frank Kabel" wrote in message
...
Hi Robin
AFAIK you can't set this property to False outside VBA. As I'm not
using Web queries, don't they have a setting to omitt error messages?

--
Regards
Frank Kabel
Frankfurt, Germany


Robin Hammond wrote:
Questions:
1. Can anyone think of a way to disable alerts on background queries
when the Excel application is in control. (please see below before
answering that I should set displayalerts = false).
2. Is there a timeout property that can be set on a web query.

This might seem a bit arcane, but is quite critical to a web data
capture routine. I need to turn off alerts WHILE excel, NOT vba is in
control of operations.

I have a vba routine that generates potentialy thousands of web
queries in a workbook. Madness I know but there is method. These
queries run massively quicker when they are performed as background
queries - ie. once excel gets back in control when the vba routine
that built the queries has finished. I have a timer running (ported
from vb in an activex wrapper) that monitors the progress of the
queries, then runs some clean up routines when everything has been
completed.

Problems a
1. If there is an error at the server or in the query, Excel displays
an alert. VBA is not running at this point other than the periodic
timer routine, so displayalerts = false makes no difference to the
error message being displayed. Excel help has the following to say
about displayalerts: If you set this property to False, Micorosoft
Excel sets this property to True when the code is finished, unless
you are running cross process code.
2. If the queries take too long, I get a time out error, also leading
to problem 1. And, once the errors start, they are hard to stop since
the app is halted for the error, meaning data returns are probably
creating errors.

Finally, having spent ages trying to work out a robust timer solution
in vba, akin to the vb timer, I'll post the activex solution in the
next few days for general usage. If anyone would like to give it a
whirl in the meantime for a bit of testing, please let me know.

Thanks in advance,

Robin Hammond
www.enhanceddatasystems.com




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
DisplayAlerts and ScreenUpdate will not set to False Joe at Baso New Users to Excel 1 April 5th 05 07:41 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 0 April 7th 04 06:11 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 1 April 6th 04 10:45 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 2 April 2nd 04 12:28 PM
DisplayAlerts property is not changing to False myoung Excel Programming 1 November 19th 03 04:48 PM


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