Non l'hai specificato, ma immagino tu usi l'automazione.
Io faccio così:
codice:
With excelWorksheet
' ------------------------------------------------------------
' DIVIDI FINESTRA
.Range("A1").Select
.Range(excelApp.ActiveWindow.Selection, excelApp.ActiveWindow.Selection.End(xlToRight)).Select
excelWorksheet.Activate
With excelApp.ActiveWindow
.SplitColumn = 0
.SplitRow = 1
.FreezePanes = True
.SmallScroll Down:=-3
End With
' ------------------------------------------------------------
' FILTRO DATI
.Range("A1").Select
.Range(excelApp.ActiveWindow.Selection, excelApp.ActiveWindow.Selection.End(xlToRight)).Select
excelApp.ActiveWindow.Selection.AutoFilter
.Range("A1").Select
End With