PC Review


Reply
Thread Tools Rate Thread

Checking Web Queries

 
 
MM User
Guest
Posts: n/a
 
      19th Jan 2008
Hi,

I have a macro that grabs info as a query from the internet:


ThisWorkbook.Sheets("Data").QueryTables("ReportData_1").Refresh
BackgroundQuery:=False

MsgBox ("Data Successfully Loaded !")

Is there a way to only show the MsgBox if it is successful?

Regards,


 
Reply With Quote
 
 
 
 
Mike Fogleman
Guest
Posts: n/a
 
      19th Jan 2008
Perhaps try On Error Exit Sub.
If the query errors out then it would exit without running the msg line.
Worth a try, I haven't tested it.

Mike F
"MM User" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I have a macro that grabs info as a query from the internet:
>
>
> ThisWorkbook.Sheets("Data").QueryTables("ReportData_1").Refresh
> BackgroundQuery:=False
>
> MsgBox ("Data Successfully Loaded !")
>
> Is there a way to only show the MsgBox if it is successful?
>
> Regards,
>
>



 
Reply With Quote
 
MM User
Guest
Posts: n/a
 
      19th Jan 2008
Thanks Mike,

not sure why I did not think about this myself! thanks for the heads up.


"Mike Fogleman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Perhaps try On Error Exit Sub.
> If the query errors out then it would exit without running the msg line.
> Worth a try, I haven't tested it.
>
> Mike F
> "MM User" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi,
>>
>> I have a macro that grabs info as a query from the internet:
>>
>>
>> ThisWorkbook.Sheets("Data").QueryTables("ReportData_1").Refresh
>> BackgroundQuery:=False
>>
>> MsgBox ("Data Successfully Loaded !")
>>
>> Is there a way to only show the MsgBox if it is successful?
>>
>> Regards,
>>
>>

>
>


 
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
checking queries between programs Garry Microsoft Access Queries 1 13th Sep 2007 04:38 PM
Some Word docs not spell checking even after checking settings. =?Utf-8?B?WmVl?= Microsoft Word Document Management 3 26th Feb 2006 01:45 PM
Checking through queries at run time =?Utf-8?B?cG9tcGV5amlt?= Microsoft Access Database Table Design 3 28th Jun 2005 05:03 PM
Checking for results of SQL statements without saving queries. Amir Microsoft Access Queries 4 22nd Jan 2005 03:24 PM
Conflicting used space information when checking the drive property against marking all files and checking the marked file properties. elloko Windows XP Configuration 3 19th Dec 2004 05:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:56 AM.