I have an excel file that I use to update daily schedules.
The code is fairly simple yet has intermittent faults due to an unknown reason.
The code below opens a file( on teams), updates links and then closes the file, the fault is, sometimes the file will open and close but not update the links contained in the file.
The file is shared with other users so they can modify the file through the teams application.
The main file is stored on a network and the file it opens is stored on teams/ sharepoint.
All help is fully appreciated!
The code is fairly simple yet has intermittent faults due to an unknown reason.
The code below opens a file( on teams), updates links and then closes the file, the fault is, sometimes the file will open and close but not update the links contained in the file.
The file is shared with other users so they can modify the file through the teams application.
The main file is stored on a network and the file it opens is stored on teams/ sharepoint.
VBA Code:
Workbooks.Open ("https://bakerhughes.sharepoint.com/sites/OFSBridgeOfDonProductionSchedule-GOODWAY1/Shared%20Documents/GOODWAY1/CHUCKER.xlsx?web=1"), UpdateLinks = 1
Worksheets("Sheet1").Unprotect
Range("J1").Value = Format(Now, "dd/mm/yyyy HH:mm")
Worksheets("Sheet1").Range("K3:K16").Clear
Worksheets("Sheet1").Range("3:16").EntireRow.Hidden = False
Range("K:K").Locked = False
Worksheets("Sheet1").Protect
ActiveWorkbook.AutoSaveOn = True
ActiveWorkbook.Close savechanges = True
All help is fully appreciated!