可用Protect 方法的参数设置 AllowSorting 属性。 示例 本示例允许用户对受保护的工作表上未锁定或未保护的单元格进行排序,并通知用户。 Sub ProtectionOptions() ActiveSheet.Unprotect ' Unlock cells A1 through B5. Range("A1:B5").Locked = False ' Allo
Range("A1:B5").Locked = False ' Allow sorting to be performed on the protected worksheet. If ActiveSheet.Protection.AllowSorting = False Then ActiveSheet.Protect AllowSorting:=True End If MsgBox "For cells A1 through B5, sorting can be performed on the protected worksheet." End Sub 支援和...
C# 复制 public bool AllowSorting { get; } 属性值 Boolean 注解 在受保护的工作表中,只能对未锁定或未受保护的单元格执行排序。 可以使用 方法参数设置 Protect(Object, Object, Object)AllowSorting 属性。 适用于 产品版本 Excel primary interop assembly Latest 反馈...
B5. Range("A1:B5").Locked = False ' Allow sorting to be performed on the protected worksheet. If ActiveSheet.Protection.AllowSorting = False Then ActiveSheet.Protect AllowSorting:=True End If MsgBox "For cells A1 through B5, sorting can be performed on the protected worksheet." End Sub...
The code will check the first cell from above the selected cell, it will reprotect the table if that cell is protected: Target.Cells.Offset(Off, 0).Locked = False Download the sample workbook:Autoexpand table on protected sheet.xlsm
AllowInsertingHyperlinks:=False, AllowDeletingColumns:=False, AllowDeletingRows:=False, AllowSorting:= True, AllowFiltering:=True, AllowUsingPivotTables:=False one problem I am facing is, after opening the worksheet, without enabling the macros in my excel if an excel user tries to copy paste any...
The above picture is an example of a simple sheet with some random numbers. It is really hard to follow let us say Kiwis monthly numbers to the right. Scrolling and larger columns is also a troublemaker for readers. Sheets printed out on paper has the same problem. Worksheets must be eas...
AllowDeletingRows Object true allows the user to delete rows on the protected worksheet, where every cell in the row to be deleted is unlocked. The default value is false. AllowSorting Object true allows the user to sort on the protected worksheet. Every cell in the sort range must be ...
Exception is thrown on opening an SJS file that contains invalid quality factor.(DOCXLS-11118) The text that exceeds the boundaries of the shapes has not been cropped in the exported PDF file.(DOCXLS-11119) After setting the value to a cell range, the row count of the sheet becomes 10485...
Once done, launch Microsoft Excel and see if the delete sheet function is working. 2. Unportect Your Workbook. One of the main reasons why you can’t delete a sheet on Microsoft Excel is if your workbook is protected. To confirm this, try checking if your workbook is protected and unpro...