Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Force synchronize list with VBA

Dear all,
I need help on auto-sync Excel with Sharepoint. I created an Excel 2003
worksheet by right-clicking at Sharepoint site, select "export to Excel". The
worksheet created is then linked to Sharepoint. Everytime when I open the
Exce workbook, it prompts for Enable or Disable background refresh. I always
enable it and leave it open throughout the day. However, I find that it never
refresh during the day, I have to manually clicking on the 'synchronize list'
button to get it refeshed with data on the Sharepoint. I therefore think of
using VBA to force it to refresh with ontime event.
Sub Refresh()
Sheets("CMR").Activate
ThisWorkbook.ActiveSheet.UsedRange.Select
Selection.QueryTables.Refresh BackgroundQuery:=True
ThisWorkbook.Save
End Sub

When reaching the line "Selection.QueryTables.Refresh
BackgroundQuery:=True", I got the error: "Run-time error '438': Object
doesnt' support this prorperty or method."

What should I do to get around it?

Thanks in advance.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation - Force entry from drop down list JeffH Excel Discussion (Misc queries) 1 March 11th 09 06:56 PM
How to force cell input from a List? NightLord Excel Discussion (Misc queries) 3 September 27th 08 01:24 AM
force a selection from a list of words Rick S. Excel Programming 4 January 24th 08 10:54 PM
Can't Synchronize Excel List with Sharepoint TommyVee Excel Discussion (Misc queries) 0 July 27th 07 10:08 PM
How to force a Default sort for a validation list scott56hannah Excel Discussion (Misc queries) 0 April 18th 06 03:05 AM


All times are GMT +1. The time now is 04:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"