Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking Web Queries
Hi,
I have a macro that grabs info as a query from the internet: ThisWorkbook.Sheets("Data").QueryTables("ReportDat a_1").Refresh BackgroundQuery:=False MsgBox ("Data Successfully Loaded !") Is there a way to only show the MsgBox if it is successful? Regards, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking Web Queries
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" wrote in message ... Hi, I have a macro that grabs info as a query from the internet: ThisWorkbook.Sheets("Data").QueryTables("ReportDat a_1").Refresh BackgroundQuery:=False MsgBox ("Data Successfully Loaded !") Is there a way to only show the MsgBox if it is successful? Regards, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking Web Queries
Thanks Mike,
not sure why I did not think about this myself! thanks for the heads up. "Mike Fogleman" wrote in message . .. 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" wrote in message ... Hi, I have a macro that grabs info as a query from the internet: ThisWorkbook.Sheets("Data").QueryTables("ReportDat a_1").Refresh BackgroundQuery:=False MsgBox ("Data Successfully Loaded !") Is there a way to only show the MsgBox if it is successful? Regards, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Spell Checking with checking cell notes | Excel Discussion (Misc queries) | |||
Checking range of cells for entry then checking for total | Excel Programming | |||
Web Queries | Excel Worksheet Functions | |||
Web Queries | Excel Discussion (Misc queries) | |||
SQL Queries in VBA | Excel Programming |