Showing results for 
Search instead for 
Did you mean: 

Excel - UpdateLinks := causing syntax error

Occasional Contributor

Excel - UpdateLinks := causing syntax error



Possible silly question time.


I have several spreadsheets which contain links to cells in other spreadsheets. I need these links to be updated while a test is running, however whenever i open the workbook using the following i get a syntax error at the :=


Dim objWorkBook   Set objWorkBook = objExcel.Workbooks.Open(strWorkBookName, Updatelinks:=True)


I have tried replacing the := with just = and while the syntax error is resolved it doesn't update the link...


Does anyone have a working solution to get around the := causing a syntax problem.


Many thanks

Community Hero

Re: Excel - UpdateLinks := causing syntax error

Let me understand your question,


For Ex: You are having a Workbook with 2 sheets.


A1 cell of in Sheet1 having value of "Test"

You are linking A1 cell of Sheet1 in A2 cell of Sheet2 as below,



Then you will see the Link in A1 cell in Sheet2 as below,



I guess, You are expecting "Test" text in the A2 cell of Sheet2 thru TC script.


For this you are using UpdateLinks Correct?


Shankar R

LinkedIn | CG-VAK Software | Bitbucket |

“You must expect great things from you, before you can do them”

Extension Available

Community Hero

Re: Excel - UpdateLinks := causing syntax error

From a dim and distant memory, I'm sure there is an option setting somewhere in Excel which determines whether it tries to automatically update things like this when you open a sheet?


I'm wondering if that may be part of the problem. If you set it to ignore notifications before opening the file, does this still happen?




Update. Sorry. I just re-read it. I think it's that setting you're trying to trigger on opening the sheet.


I've never tried to do this. Is it a setting (such as visibility and notifications) that you set before opening the sheet?

New Here?
Join us and watch the welcome video:
Top Kudoed Authors