Excel worksheet been working happily for many months. This error was reported by a Excel 365 user. I tested the actions out on the master copy (using excel 2016) and get exactly the same error[code]
ThisWorkbook.Sheets(asSheetNames).Copy
Dim wb As Workbook
' new workbook created as a result of the copy operation should be last
' in the workbooks list
Set wb = Workbooks(Workbooks.Count)
' make it unlocked
' -------------------------------------------
' declare variable for LockXLS Runtime object
Dim oLockXLS As Object
' create LockXLS Runtime object
Set oLockXLS = CreateObject("LockXLSRuntime.Connect")
' unlock new workbook
Call oLockXLS.UnlockWorkbook(wb)
Set oWorkbook = Nothing
The error is reported on the line containing statement Set oLockXLS = CreateObject
I tested an earlier master version and get exactly the same error
Anyone got an idea of what might have happened and how I might set about fixing this?