maniootek Posted May 7, 2017 Share Posted May 7, 2017 In Excel there is option to freeze topmost row (A) and while you scrolling down you can always see this first row. I am looking for method to do same in Autoit. I just found Window.FreezePanes method which might work but I am not sure how to use it. Link to comment Share on other sites More sharing options...
Popular Post Subz Posted May 7, 2017 Popular Post Share Posted May 7, 2017 Couple of ways: #include <Excel.au3> ;~ Example 1 Local $oExcel = _Excel_Open() $oExcel.ActiveWindow.FreezePanes = False Local $sWorkbook = @ScriptDir & "\FileName.xlsx" Local $oWorkbook = _Excel_BookOpen($oExcel, $sWorkbook) $oWorkbook.ActiveSheet.Range("B2").Select $oExcel.ActiveWindow.FreezePanes = True ;~ Example 2 Local $oExcel = _Excel_Open() $oExcel.ActiveWindow.FreezePanes = False Local $sWorkbook = @ScriptDir & "\FileName.xlsx" Local $oWorkbook = _Excel_BookOpen($oExcel, $sWorkbook) _Excel_FreezePanes($oExcel, 2, 2) Func _Excel_FreezePanes($oExcel, $iCol = 0, $iRow = 1) If Not IsObj($oExcel) Or ObjName($oExcel, 1) <> "_Application" Then Return $oExcel.ActiveWindow.SplitColumn = $iCol $oExcel.ActiveWindow.SplitRow = $iRow $oExcel.ActiveWindow.FreezePanes = True EndFunc maniootek, hugomito, ThomasBennett and 2 others 2 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now