Hi everyone,
I have a workbook with VBA code. One of the worksheet is Proteced and the VBA code is Protected.
The VBA code is unprotecting the worksheet and afterwards protect it again.
The programm is loading data from an external source (*.txt files). Sometimes the Excel file crashes due to the fact that an user has no right to access a direcory or file.
In this case the when re-opening Excel the worksheet is unprotected. After running VBA code the worksheet is portected again.
How can I change the VBA code so the worksheet is protect after a crash?
I have a workbook with VBA code. One of the worksheet is Proteced and the VBA code is Protected.
The VBA code is unprotecting the worksheet and afterwards protect it again.
The programm is loading data from an external source (*.txt files). Sometimes the Excel file crashes due to the fact that an user has no right to access a direcory or file.
In this case the when re-opening Excel the worksheet is unprotected. After running VBA code the worksheet is portected again.
How can I change the VBA code so the worksheet is protect after a crash?