![]() |
Overwriting/Overlapping web query problem
I have a web query that overlaps another query. When the second we
query is added to the sheet through vba, it is suppose to overwrite th data of the first query in which it overlaps. It does in fact overwrit the data fine, however, it doesnt seem to overwrite the quer defintion. Therefore, strangely, the overlapped data contains the dat of the second query, but the query definition of the first query (whic is problematic, since I will need to refresh these queries at certai times). The code first inserts some lines, and then runs this bit to add th new query table: (both query tables run this code) With QueryTables.Add(Connection:=ConnectURL, Destination:=[B4]) .PostText = postStr .BackgroundQuery = True .PreserveFormatting = False .AdjustColumnWidth = False .RefreshStyle = xlOverwriteCells .Name = strYesterday .WebSelectionType = xlSpecifiedTables .WebTables = "4" .Refresh BackgroundQuery:=False .SaveData = True End With So, i was just wondering if i was missing something. Also, is there a way to refresh only the data, of a truncated query that remains? For example, if I delete a row from a query, can refresh the remaining query without having that row reappear on th refresh -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 07:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com