Hi,
I have a small problem, I have a script in worksheet change sub, However I added a piece to sort the columns. Is there a way I can have the sort not take place till after the data is entered into range "B"
As it is now the script runs as soon as the users enters anything in range "A"
Thank You, Mike
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect "Password"
If Target.Cells.Count > 1 Then
Exit Sub
End If
On Error GoTo ErrHandler:
If Not Application.Intersect(Me.Range("A5:B100"), Target) Is Nothing Then
If IsNumeric(Target.Value) = False Then
Application.EnableEvents = False
'Target.Value = StrConv(Target.Text, vbLowerCase)
'Target.Value = StrConv(Target.Text, vbUpperCase)
Target.Value = StrConv(Target.Text, vbProperCase)
Application.EnableEvents = True
End If
End If
ErrHandler:
Application.EnableEvents = True
'Part 2
Application.ScreenUpdating = False
Range("A3:B100").Select
Selection.Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Application.ScreenUpdating = True
ActiveSheet.Protect "Password"
End Sub
Bookmarks