I'm trying to remove link in Excel 2010 that had been created by copying ranges from other workbooks using the following lines of code in VBA.
For some reason the links to not get removed and remain. No error message, but no success either.
Interestingly, when I try to break the link using the Excel user interface, they also remain.
Any ideas what I'm doing wrong?
vLinks = gxlbTarget.LinkSources(xlLinkTypeExcelLinks)
For Each strLink In vLinks
gxlbTarget.BreakLink name:=strLink, Type:=xlLinkTypeExcelLinks
Works for me... maybe your workbook or worksheet is protected?
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?