drom
Well-known Member
- Joined
- Mar 20, 2005
- Messages
- 566
- Office Version
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
Hi and thanks in advance !
I hace the following macro created recording a macro and adjusting a few things, eg
My problem:
If I use :
This shorter macro, easyer to check stil not working
What am I missing
Itm it possible to sort in a protected tab/sheet ?
I hace the following macro created recording a macro and adjusting a few things, eg
VBA Code:
Sub Macro2()
Dim wPass As String: wPass = ""
ActiveSheet.Unprotect
Debug.Print Err, Err.Description
'The inmediate window Shows 0
ActiveSheet.Unprotect Password:=wPass
Debug.Print Err, Err.Description
'The inmediate window Shows 0
ActiveSheet.Protect _
UserInterfaceOnly:=True, _
Password:=wPass, _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=True, _
AllowFormattingRows:=True, _
AllowInsertingColumns:=True, _
AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=True, _
AllowDeletingRows:=True, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True
Debug.Print Err, Err.Description
'The inmediate window Shows 0
End Sub
My problem:
- Sorting does not work
If I use :
VBA Code:
Sub Macro3()
ActiveSheet.Unprotect
Debug.Print Err, Err.Description
'The inmediate window Shows 0
ActiveSheet.Unprotect Password:=wPass
Debug.Print Err, Err.Description
'The inmediate window Shows 0
ActiveSheet.Protect _
AllowSorting:=True
Debug.Print Err, Err.Description
'The inmediate window Shows 0
End Sub
This shorter macro, easyer to check stil not working
What am I missing
Itm it possible to sort in a protected tab/sheet ?