0

I have a worksheet with some VBA buttons which are used to refresh some data connections in the workbook. I'm using Excel 2016 for Mac, V15.39 (16.9 is too buggy to use in my case). The macros used to work, but an update happened at some point which made it so Excel crashes when trying to run them. Here's an example of one:

Sub Refresh_Offer_And_Non_Tee()

With Worksheets("Offer_WINs").QueryTables(1).Refresh
With Worksheets("Non_Tee_Finder").QueryTables(1).Refresh

End With
End With
End Sub

I've looked up alternatives to "QueryTables" but nothing seems to work.

Things I've tried/checked: -I'm able to refresh the data connection though the "Workbook Connections" window so I know the connections work properly. -Other VBA macros not related to data connections are working and buttons work fine. -I'm not using any Excel add-ons. Thanks for any help!

  • Please check in immediate window the following: `?Sheet1.QueryTables.Count` and `?Sheet1.ListObjects.Count`. If ListObjects is non-zero and QueryTables is zero try to replace QueryTables(1) with ListObjects(1). Via: https://stackoverflow.com/questions/39027286/how-to-reference-and-refresh-a-querytable-in-excel-2016-in-vba – TomJohn Feb 08 '18 at 22:14
  • This was one of the solutions I tried as an alternative to "QueryTables" but it gives the error: "438: Object doesn't support this property or method". – Audrey Marie Meyer Feb 12 '18 at 23:35
  • I just found this: https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_mac-msoversion_other/excel-querytable-refresh-stopped-working-after/bf19f7cc-4f57-4794-bed7-f2a553a67b2d Maybe the issue is related... – Audrey Marie Meyer Feb 12 '18 at 23:53

0 Answers0