I’m attempting to get my program to update the sources of links in an Excel workbook. When you go to the ‘Edit Links’ button in Excel you get a list of links the workbook has so my algorithm works like so:
- Store the links you wish to update in a list variable. Record the position of each link to update in the list of links mentioned above (by number)
- Then, when the time comes, ‘for each item’ in the links to update list, ‘if’ said ‘item’ contains a certain substring of the link I want to update, go to that position and change the source
The issue I get is that this works for the first item but then doesn’t work for the other item. It does the first item in the list then just tries to do it again and again. Any advice? Feels like the If-Else condition just doesn’t work at all.
I seemed to get issues with the If-Else conditions in other contexts too.