A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi Ludovic C!
To prevent Excel from automatically scrolling down after each change, you can modify your VBA code as follows:
Worksheet Code:
Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False ' Disable event handling temporarily ORDENAR Application.EnableEvents = True ' Enable event handling End Sub
Module Code: Sub ORDENAR() Application.ScreenUpdating = False ' Disable screen updating temporarily
With ActiveWorkbook.Worksheets("INV."). ListObjects("Table1"). Sort . SortFields.Clear . SortFields.Add2 Key:=Range("Table1[Monto]"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal . Header = xlYes . MatchCase = False . Orientation = xlTopToBottom . SortMethod = xlPinYin . Apply End With
Application.ScreenUpdating = True ' Enable screen updating End Sub
Kindly let me know, if you require additional assistance, I will be glad to help further.
Best Regards, Shakiru