dparteka
Member
I have a main-workbook that has hundreds of links to sub-workbooks. The sub-workbooks get created daily so their quantity is always growing day by day. The main-workbook already has all the links to the existing sub-workbooks in it and also the ones that have yet to be created.
I'm using the code shown below in a commandbutton to perform the link updates as needed. That code is for the first two links, all the others are the same except 18-xxx changes.
This works fine except when it gets to the first link that does not exist, when that happens it wants to be directed to the location of the link which does not exist.
The question: Is there code that can skip over the ones that do not have a link or code that checks if there is a link and if not then moves on. I've tried On Error Resume Next but this doesn't work, probably because it's not really an error.
Thank you for looking, your help will be genuinely appreciated.
I'm using the code shown below in a commandbutton to perform the link updates as needed. That code is for the first two links, all the others are the same except 18-xxx changes.
This works fine except when it gets to the first link that does not exist, when that happens it wants to be directed to the location of the link which does not exist.
The question: Is there code that can skip over the ones that do not have a link or code that checks if there is a link and if not then moves on. I've tried On Error Resume Next but this doesn't work, probably because it's not really an error.
Thank you for looking, your help will be genuinely appreciated.
Code:
ActiveWorkbook.UpdateLink Name:= _
"H:\Public\Quality Assurance\Issue Resolution Reports\2018\Records\18-001.xlsm" _
, Type:=xlExcelLinks
ActiveWorkbook.UpdateLink Name:= _
"H:\Public\Quality Assurance\Issue Resolution Reports\2018\Records\18-002.xlsm" _
, Type:=xlExcelLinks