View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Help with Excel FreezePanes from code

Dim xl As Worksheet

Set xl = Activesheet
xl.Selection.Cells(2, 2).Activate()
xl.ActiveWindow.FreezePanes = True

--
Regards,
Tom Ogilvy


"lanem" wrote:

I can't get this to work. Please help. Here's my code:

Dim xl As New Spreadsheet

xl.Selection.Cells(2, 2).Activate()
xl.ActiveWindow.FreezePanes = True

There's no errors . . . it just doesn't set up the FreezePanes stuff.