Hi, I have a MS Excel file with macros. There is a button that refreshes to get current data from a website’s API.
When I click on the button, the 421 Error appears and points me to this line:
ActiveWorkbook.Connections(“Query - page1”).Refresh
What should I do now? There have been questions about 423, but not specifically this one.
I would be grateful for some help or hints. I am not a programmer, but will give it a try.
More, if this could help:
Else
If Range(“C2”) < 1501 Then
ActiveWorkbook.Connections("Query - page1").Refresh
ActiveWorkbook.Connections("Query - page2").Refresh
ActiveWorkbook.Connections("Query - page3").Refresh
ActiveWorkbook.Connections("Query - page4").Refresh
ActiveWorkbook.Connections("Query - page5").Refresh
ActiveWorkbook.Connections("Query - page6").Refresh
ActiveWorkbook.Connections("Query - exchange_rates").Refresh
Else
If Range(“C2”) < 1751 Then