I am writing a VBA macro in Outlook that references an Excel workbook and makes changes to that workbook. I want to freeze panes (not "Split") just below row 1.
Here's the code I tried:
With Excel.ActiveWindow
.SplitColumn = 0
.SplitRow = 3
.FreezePanes = True
End With
...and...
Dim excApp As Object
Set excApp = CreateObject("Excel.Application")
With excApp.ActiveWindow
.SplitColumn = 0
.SplitRow = 3
.FreezePanes = True
End With
Both threw run-time error 91 at the line .SplitColumn = 0
.
I appreciate any help or pointers. Thanks!