I need to freeze the panes in an Excel spreadsheet form within Access
I have the following code:
The codes runs, but the panes are not frozen. (I got this from the Excel macro recorder)
I need both panes frozen
Where is my error?
Many thanks in advance
I have the following code:
Code:
Dim ApXL As Object
Dim xlWBk As Object
Dim xlWSh As Object
Set ApXL = CreateObject("Excel.Application")
Set xlWBk = ApXL.Workbooks.Add
Set xlWSh = xlWBk.Worksheets(1)
With xlWSh.Range("B5")
ActiveWindow.FreezePanes = True
End With
The codes runs, but the panes are not frozen. (I got this from the Excel macro recorder)
I need both panes frozen
Where is my error?
Many thanks in advance