I am trying to open and unprotect an excel from Access, I have the following code which opens the file but I am not able to unprotect once it is open. Could you help me to fix it? It would be fantastic if I could unprotect/protect without opening the file.
Dim xlAp As Excel.Application
Dim xlWB As Excel.Workbook
Set xlApp = New Excel.Application
.Visible = True
Set xlWB = .Workbooks.Open("C:\WFReports_CG.xls", , False)
Set xlWB = .ThisWorkbook.UnProtect("101112131415161718191a1b1c")