excelguru123
New Member
- Joined
- Jun 23, 2021
- Messages
- 2
- Office Version
- 2013
- Platform
- Windows
hey folks,
so I have a file that uses 3 different files that need to be updated on a monthly basis. every month, the files get saved into the appropriate month's folder (every month a new folder is created and all new work is saved into that folder). for example
So far, I used the following code to pull all the links out:
This pulls out the current links in the file -- I want to then be able to update these to the most recent month and drafts -- how do I go about doing that?
If you're still with me, thanks for reading!!!
so I have a file that uses 3 different files that need to be updated on a monthly basis. every month, the files get saved into the appropriate month's folder (every month a new folder is created and all new work is saved into that folder). for example
- for may the folder is named: \\path\\majorfolder\subfolder\may2021\xlfile
- for june it will be: \\path\\majorfolde\subfolder\june2021\xlfile
- again for may, it will be \\path\\majorfolde\subfolder\may2021\xlfile_draft_1
- \\path\\majorfolde\subfolder\may2021\xlfile_draft_2
- similarly for june: \\path\\majorfolde\subfolder\june2021\xlfile_draft_1
- and so on
So far, I used the following code to pull all the links out:
VBA Code:
aLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
If Not IsEmpty(aLinks) Then
For i = 1 to Ubound(aLinks)
Cells(i,1).Value = aLinks(i)
Next i
End If
This pulls out the current links in the file -- I want to then be able to update these to the most recent month and drafts -- how do I go about doing that?
If you're still with me, thanks for reading!!!