ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Refresh ListObject Linked it SharePoint List (https://www.excelbanter.com/excel-programming/428652-refresh-listobject-linked-sharepoint-list.html)

Kevin

Refresh ListObject Linked it SharePoint List
 
File Format: Excel 2003 (.xls)
Excel Versions: Excel 2003 & 2007

I have begun to experience a problem when using VBA to refresh a ListObject
in Excel that is linked to a SharePoint list. The ListObject appears to
refresh fine, but when I reference the ListObject cell value a zero value is
returned. This only happens in Excel 2003. The workbook and ListObject were
both created in Excel 2003. The code worked without problem until recently.
Oddly, this problem does not occur when using the file in Compatibility Mode
in Excel 2007. Here is a code snippet to illustrate:

Sheets("SPData").ListObjects("SPDataList").Refresh

For i = 3 To 10 Step 1
Rem The cell referenced below in sheet SPData is part of SPDataList
ListObject
Sheets("OtherSheet").Cells(i, 5).Value = Sheets("SPData").Cells(i, 3).Value
Next i

As I said this code worked without a problem for over a year. All of a
sudden the cells within the ListObject return 0 even though they display as
updated. Very strange!

Any ideas of things I should be checking?

Thanks,

Kevin


All times are GMT +1. The time now is 05:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com