PC Review


Reply
Thread Tools Rate Thread

Disabling error message with Web Query

 
 
=?Utf-8?B?R3VpbGhlcm1lIFNvYXJlcw==?=
Guest
Posts: n/a
 
      13th Mar 2007
Hi everyone,

I have developed an Excel Web Query that queries data from a web server and
put them into a database through VBA after refreshing. That query is running
in background and refreshes data every 30 minutes.
It happens the web server is not always available and the web query shows an
error message box ("Unalbe to http://webserver... Cannot locate the internet
server..."). The poblem is when this box appears the After_Refresh method not
execute as long as somebody clicks on the "OK" command button of the message
box.
Any idea to by pass this error message or making it not appear?

Regards,

--
Guilherme Soares
 
Reply With Quote
 
 
 
 
Tim Williams
Guest
Posts: n/a
 
      13th Mar 2007
Try

Application.Displayalerts=False
'refresh query
Application.Displayalerts=True

--
Tim Williams
Palo Alto, CA


"Guilherme Soares" <(E-Mail Removed)> wrote in message
news:731E5D00-C471-46E6-828F-(E-Mail Removed)...
> Hi everyone,
>
> I have developed an Excel Web Query that queries data from a web server and
> put them into a database through VBA after refreshing. That query is running
> in background and refreshes data every 30 minutes.
> It happens the web server is not always available and the web query shows an
> error message box ("Unalbe to http://webserver... Cannot locate the internet
> server..."). The poblem is when this box appears the After_Refresh method not
> execute as long as somebody clicks on the "OK" command button of the message
> box.
> Any idea to by pass this error message or making it not appear?
>
> Regards,
>
> --
> Guilherme Soares



 
Reply With Quote
 
=?Utf-8?B?R3VpbGhlcm1lIFNvYXJlcw==?=
Guest
Posts: n/a
 
      13th Mar 2007
Tim, thanks for your response.
You're almost there. But, not worked properly because the Refresh method
from web query is not triggered by a macro. It's a process that runs in
background (do you know how we can deal with it?). This property only disable
alert messages coming from macro.
Any other idea?

--
Guilherme Soares


"Tim Williams" wrote:

> Try
>
> Application.Displayalerts=False
> 'refresh query
> Application.Displayalerts=True
>
> --
> Tim Williams
> Palo Alto, CA
>
>
> "Guilherme Soares" <(E-Mail Removed)> wrote in message
> news:731E5D00-C471-46E6-828F-(E-Mail Removed)...
> > Hi everyone,
> >
> > I have developed an Excel Web Query that queries data from a web server and
> > put them into a database through VBA after refreshing. That query is running
> > in background and refreshes data every 30 minutes.
> > It happens the web server is not always available and the web query shows an
> > error message box ("Unalbe to http://webserver... Cannot locate the internet
> > server..."). The poblem is when this box appears the After_Refresh method not
> > execute as long as somebody clicks on the "OK" command button of the message
> > box.
> > Any idea to by pass this error message or making it not appear?
> >
> > Regards,
> >
> > --
> > Guilherme Soares

>
>
>

 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      13th Mar 2007
Have you tried using a mcro to refresh the query instead of having it run automatically ?
You could use Application.OnTime()

--
Tim Williams
Palo Alto, CA


"Guilherme Soares" <(E-Mail Removed)> wrote in message
news:00492ABF-2C00-40C0-A9CC-(E-Mail Removed)...
> Tim, thanks for your response.
> You're almost there. But, not worked properly because the Refresh method
> from web query is not triggered by a macro. It's a process that runs in
> background (do you know how we can deal with it?). This property only disable
> alert messages coming from macro.
> Any other idea?
>
> --
> Guilherme Soares
>
>
> "Tim Williams" wrote:
>
> > Try
> >
> > Application.Displayalerts=False
> > 'refresh query
> > Application.Displayalerts=True
> >
> > --
> > Tim Williams
> > Palo Alto, CA
> >
> >
> > "Guilherme Soares" <(E-Mail Removed)> wrote in message
> > news:731E5D00-C471-46E6-828F-(E-Mail Removed)...
> > > Hi everyone,
> > >
> > > I have developed an Excel Web Query that queries data from a web server and
> > > put them into a database through VBA after refreshing. That query is running
> > > in background and refreshes data every 30 minutes.
> > > It happens the web server is not always available and the web query shows an
> > > error message box ("Unalbe to http://webserver... Cannot locate the internet
> > > server..."). The poblem is when this box appears the After_Refresh method not
> > > execute as long as somebody clicks on the "OK" command button of the message
> > > box.
> > > Any idea to by pass this error message or making it not appear?
> > >
> > > Regards,
> > >
> > > --
> > > Guilherme Soares

> >
> >
> >



 
Reply With Quote
 
=?Utf-8?B?R3VpbGhlcm1lIFNvYXJlcw==?=
Guest
Posts: n/a
 
      13th Mar 2007
How can I do that? How can I trigger the Refresh method from the query?

--
Guilherme Soares


"Tim Williams" wrote:

> Have you tried using a mcro to refresh the query instead of having it run automatically ?
> You could use Application.OnTime()
>
> --
> Tim Williams
> Palo Alto, CA
>
>
> "Guilherme Soares" <(E-Mail Removed)> wrote in message
> news:00492ABF-2C00-40C0-A9CC-(E-Mail Removed)...
> > Tim, thanks for your response.
> > You're almost there. But, not worked properly because the Refresh method
> > from web query is not triggered by a macro. It's a process that runs in
> > background (do you know how we can deal with it?). This property only disable
> > alert messages coming from macro.
> > Any other idea?
> >
> > --
> > Guilherme Soares
> >
> >
> > "Tim Williams" wrote:
> >
> > > Try
> > >
> > > Application.Displayalerts=False
> > > 'refresh query
> > > Application.Displayalerts=True
> > >
> > > --
> > > Tim Williams
> > > Palo Alto, CA
> > >
> > >
> > > "Guilherme Soares" <(E-Mail Removed)> wrote in message
> > > news:731E5D00-C471-46E6-828F-(E-Mail Removed)...
> > > > Hi everyone,
> > > >
> > > > I have developed an Excel Web Query that queries data from a web server and
> > > > put them into a database through VBA after refreshing. That query is running
> > > > in background and refreshes data every 30 minutes.
> > > > It happens the web server is not always available and the web query shows an
> > > > error message box ("Unalbe to http://webserver... Cannot locate the internet
> > > > server..."). The poblem is when this box appears the After_Refresh method not
> > > > execute as long as somebody clicks on the "OK" command button of the message
> > > > box.
> > > > Any idea to by pass this error message or making it not appear?
> > > >
> > > > Regards,
> > > >
> > > > --
> > > > Guilherme Soares
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      14th Mar 2007
Create the query with automatic refresh tuned off, then use the Refresh
method to update it.

activesheet.querytables("tablename").refresh

I haven't tested that this doesn't still show the dialog though....

Tim


"Guilherme Soares" <(E-Mail Removed)> wrote in
message news:6B0F5882-02D9-42F8-A198-(E-Mail Removed)...
> How can I do that? How can I trigger the Refresh method from the query?
>
> --
> Guilherme Soares
>
>
> "Tim Williams" wrote:
>
>> Have you tried using a mcro to refresh the query instead of having it run
>> automatically ?
>> You could use Application.OnTime()
>>
>> --
>> Tim Williams
>> Palo Alto, CA
>>
>>
>> "Guilherme Soares" <(E-Mail Removed)> wrote in
>> message
>> news:00492ABF-2C00-40C0-A9CC-(E-Mail Removed)...
>> > Tim, thanks for your response.
>> > You're almost there. But, not worked properly because the Refresh
>> > method
>> > from web query is not triggered by a macro. It's a process that runs in
>> > background (do you know how we can deal with it?). This property only
>> > disable
>> > alert messages coming from macro.
>> > Any other idea?
>> >
>> > --
>> > Guilherme Soares
>> >
>> >
>> > "Tim Williams" wrote:
>> >
>> > > Try
>> > >
>> > > Application.Displayalerts=False
>> > > 'refresh query
>> > > Application.Displayalerts=True
>> > >
>> > > --
>> > > Tim Williams
>> > > Palo Alto, CA
>> > >
>> > >
>> > > "Guilherme Soares" <(E-Mail Removed)> wrote
>> > > in message
>> > > news:731E5D00-C471-46E6-828F-(E-Mail Removed)...
>> > > > Hi everyone,
>> > > >
>> > > > I have developed an Excel Web Query that queries data from a web
>> > > > server and
>> > > > put them into a database through VBA after refreshing. That query
>> > > > is running
>> > > > in background and refreshes data every 30 minutes.
>> > > > It happens the web server is not always available and the web query
>> > > > shows an
>> > > > error message box ("Unalbe to http://webserver... Cannot locate the
>> > > > internet
>> > > > server..."). The poblem is when this box appears the After_Refresh
>> > > > method not
>> > > > execute as long as somebody clicks on the "OK" command button of
>> > > > the message
>> > > > box.
>> > > > Any idea to by pass this error message or making it not appear?
>> > > >
>> > > > Regards,
>> > > >
>> > > > --
>> > > > Guilherme Soares
>> > >
>> > >
>> > >

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling VB generated error message inUnhandledException event =?Utf-8?B?Sm9obiBL?= Microsoft Dot NET Framework Forms 3 9th Nov 2006 02:06 AM
Error Disabling Connection message Richard Windows XP Help 3 8th Nov 2006 07:49 PM
Disabling error message =?Utf-8?B?U2VyZ2VqIEx1a292aWM=?= Windows XP Help 1 11th Mar 2005 11:09 AM
disabling error message =?Utf-8?B?U2VyZ2VqIEx1a292aWM=?= Windows XP Help 1 9th Mar 2005 11:44 PM
Disabling Error Message about -ve or Zero values on Log Charts Kristian Microsoft Excel Charting 1 12th Dec 2003 06:19 PM


Features
 

Advertising
 

Newsgroups
 


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