View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kevin Kevin is offline
external usenet poster
 
Posts: 504
Default 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