Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cant Freeze the top row using vba 1

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
US
I am using access 2003. I have written a module that I am calling from another sub to freeze the top row. There are no errors but the row does not freeze. Any help would be appreaciated.

module
Code:
'
First module
Public goXL As Excel.Application ' The Excel Object variable

Second module
Public Sub XLFormatFreezeTopRow()

' ****************************************************
' *** THIS SUB FREEZES THE TOP ROW *******************
' ****************************************************
    Range("A2").Select
    goXL.ActiveSheet.Range("A2").FreezePanes = True
 

End Sub

Call statement from original sub

Call XLFormatFreezeTopRow
 
What about this ?
goXL.ActiveSheet.Range("A2").Select
goXL.ActiveWindow.FreezePanes = True

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top