I need to execute VBA script while user is logged off Windows 10, i.e. script should be executed by schedule while lock screen. Script copy charts from every excel sheet and paste them on the last sheet.
When I executed the following code while user is logged on then script finished succesfully. When I executed the following code by task scheduller while lock screen then error occured "method copy of chartobject failed". I suppose that it's connected with impossibility to use clipboard on the windows 10 lock screen.
For Each rs In ThisWorkbook.Worksheets
For Each ch In ActiveSheet.ChartObjects
ch.Copy
Sheets(Sheets.Count).Select
Cells(i, 1).Select
ActiveSheet.Pictures.Paste
Next ch
i = i + 39
Next rs