Suppress background query problems in Excel 2016

dsantoa

New Member
Joined
Sep 24, 2017
Messages
1
Hi Everyone, i'm new to this forum and would really appreciate some help.

I have developed a spreadsheet that tracks crypto currency prices and volumes via a generated web query with API's and refreshes every 2 - 3 minutes. I then have a VBA code that detects a change in a cell value (after the API data is pulled in) and then executes some conditions and gives me advice on whether to buy or sell.

I have this running 24hours a day on a friends server. The idea is that it constantly refreshes and when certain conditions are met, it gives me advice via email.

In general everything works well, but sometimes excel does not get the information it requires from the API and then an error message pops up with something like: [Datasource.error] unable to retrieve information from: XXX (Bad gateway)

The problem is that the sheet then freezes until the pop up is clicked and the sheet can proceed. This happens on average twice a day and is very frustrating of course as it is supposed to work in the background without me checking up on it constantly.

I am not a programmer but I have googled and tried various things already:

  • Modified my VBA code to include Displayalerts = false (not exact code) but the error is not in the VBA code, it is prior to the code running so this does not work.
  • I have tried to suppress these popups by changing the settings but can't find a setting that does this.
  • I have written some code with autohotkeys that maximises the main excel window every hour, if the error pop up exists, it clicks enter and loops until they are all cleared and then minimises excel again.

The last option works best so far and in testing works flawlessly. My problem however is that sometimes when I check on the sheet (via remote connection) there are no popups but excel is frozen trying to retrieve the API (remains in the :Running background query mode) and is completely unresponsive. I then have to force it closed with task manager and open the sheet again.

I can't for the life of me figure out why it does this. Is there anybody that can perhaps help with a better solution? or to force excel to work through those pop ups? I don't mind if it misses an update every now and again. It can just catch it in the next one. Main thing is that the sheet must continue to run constantly.

Thanks in advance!
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top