I would like to do something like when changing Row B in Sheet 2 automatically do sorting with Row B in Sheet 1

I am currently using these codes

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("B:B")) Is Nothing Then
Range("B1").Sort Key1:=Range("B2"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
End Sub

However, I find that the items will not automatically sort when I open the file/ when there are changes made in Sheet 1.
I have to enter a new number in Row B in Sheet 2 everytime so that it starts the VBA codes and do an automatic sorting.

Any solution?