Here is another sample with a fully synced timescale containing two intervals with suspicious prefixes. VBA script The entire script, all subroutines and functions of the VBA is presented and commented below. Comments Code All variables must be declared Option Explicit Sub Oval3_Click() The sole user interface to activate or deactivate the background periodic Schedule script End Sub This subroutine activates the data sheet and in it, activates the most Sub shdata() recent log record. For an unknown reason, ThisWorkbook.Activate CopyFromRecordset method of a ThisWorkbook.Sheets(1).Activate range("log_range").Cells(2, 3).Activate range (see below in the code) generates an error when the active End Sub worksheet is not the one where the range belongs to. Sub shchart() ThisWorkbook.Activate Activates the sheet. ThisWorkbook.Sheets(2).Activate End Sub Sub datalock() The worksheet is protected after the ThisWorkbook.Activate ThisWorkbook.Sheets(1).Unprotect execution of the script. In the Excel vba_out "protect worksheet" file, only the input cells of the user are ThisWorkbook.Sheets(1).Protect unlocked. password:="" ThisWorkbook.Sheets(2).Protect password:=""
Here is another sample with a fully synced timescale containing two intervals with suspicious prefixes. VBA script The entire script, all subroutines and functions of the VBA is presented and commented below. Code Comments Option Explicit All variables must be declared Sub Oval3_Click() Schedule End Sub The sole user interface to activate or deactivate the background periodic script Sub shdata() ThisWorkbook.Activate ThisWorkbook.Sheets(1).Activate range("log_range").Cells(2, 3).Activate End Sub This subroutine activates the data sheet and in it, activates the most recent log record. For an unknown reason, CopyFromRecordset method of a range (see below in the code) generates an error when the active worksheet is not the one where the range belongs to. Sub shchart() ThisWorkbook.Activate ThisWorkbook.Sheets(2).Activate End Sub Activates the sheet. Sub datalock() ThisWorkbook.Activate ThisWorkbook.Sheets(1).Unprotect vba_out "protect worksheet" ThisWorkbook.Sheets(1).Protect password:="" ThisWorkbook.Sheets(2).Protect password:="" The worksheet is protected after the execution of the script. In the Excel file, only the input cells of the user are unlocked.
index11.docx