Hi All
I allway write all my code in lowercase, so that when it capitalises I know I have spelt it correctly. However I have been looking for a better way to protect my workbook to avoid the endless looping. And found the UserInterfaceOnly property which seems to state it will allow VBA even when the sheet is protected.
My idea was to add this to my Workbook Open event and remove my 'unprotect' & 'protect' codes form all my other slow codes.
as you can see below, the statement does not autocapitalise or appear to be working (no errors though)
Has anybody used this before? and has any idea how to fix?
Cheers
I allway write all my code in lowercase, so that when it capitalises I know I have spelt it correctly. However I have been looking for a better way to protect my workbook to avoid the endless looping. And found the UserInterfaceOnly property which seems to state it will allow VBA even when the sheet is protected.
My idea was to add this to my Workbook Open event and remove my 'unprotect' & 'protect' codes form all my other slow codes.
as you can see below, the statement does not autocapitalise or appear to be working (no errors though)
Code:
Dim ws As Worksheet
Dim pwd As String
pwd = "1973"
For Each ws In Worksheets
ws.Protect Password:=pwd, userinterfaceonly:=True, AllowFiltering:=True
Next
Has anybody used this before? and has any idea how to fix?
Cheers