Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I use the code to automatically sort the table by attribute "Name" from column B.
Private Sub Worksheet_Change(ByVal Target As Excel.Range) On Error Resume Next If Not Intersect(Target, Range("A:Z")) Is Nothing Then Range("B5").Sort Key1:=Range("B6"), _ Order1:=xlAscending, Header:=xlYes, _ OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom End If End Sub The first problem with this code is that when I delete a record after the first line remains an empty cell. The second problem is how to make the code work while sheet is password-protected. Protected password can be found in sheet PASS. This is the WeTransfer link to an Excel file: https://we.tl/t-00zqVQgx82 Last edited by Roumen Roussev : April 26th 19 at 11:03 AM Reason: I'm sorry, but I realized the open post was not in the correct thread. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Chartobjects protected but it can still be deleted, edited and movedby the user (yes, the sheet is protected) | Excel Programming | |||
Auto filter sort ascending not working while sheet protected | Excel Worksheet Functions | |||
Unable to sort protected table | Excel Programming | |||
Refresh Pivot table data in Protected sheet | Excel Discussion (Misc queries) | |||
Unable to open excel sheet in Protected mode from VB 6.0 | Setting up and Configuration of Excel |