I recently upgraded from Excel 2013 to O365 Version 1808 (Build 10730.20262) - https://docs.microsoft.com/en-us/officeupdates/semi-annual-channel-targeted-2018.
I am now unable to use the VBA code ListObject..Refresh BackgroundQuery:=False to refresh queries in background without changing the query properties.
As a test, I have created a query with the following M code:
Dim tbl As ListObject
Set tbl = ActiveWorkbook.ActiveSheet.ListObjects("Query1")
tbl.Refresh BackgroundQuery:=False
End Sub
The error message received is:
Compile error: Wrong number of arguments or invalid property assignment.
Any suggestions? This appears to be a bug with Excel as I cannot find any notes that the property was removed.
Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another.
Any content of an adult theme or inappropriate to a community web site.
Any image, link, or discussion of nudity.
Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect.
Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software.
Unsolicited bulk mail or bulk advertising.
Any link to or advocacy of virus, spyware, malware, or phishing sites.
Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct.
Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.
Sub test()
Dim tbl As ListObject
Set tbl = ActiveWorkbook.ActiveSheet.ListObjects("Query1")
tbl
.QueryTable
.Refresh BackgroundQuery:=False
End Sub
works better?
Cheers | Lz. (GMT +1)
Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another.
Any content of an adult theme or inappropriate to a community web site.
Any image, link, or discussion of nudity.
Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect.
Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software.
Unsolicited bulk mail or bulk advertising.
Any link to or advocacy of virus, spyware, malware, or phishing sites.
Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct.
Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.