Quote Originally Posted by SP69 View Post
I want to freeze panes but dont want to activate sheet i.e. in common i use activewindow.freezepanes method but that require sheet to be activated.
any alternate to that??
I do not know of any other way to do it, but that doesn't mean you have to leave it as the active sheet nor let the user see it become active. Consider this structure for your code...
Code:
Sub FreezePanesOnAnotherSheet()
  Dim CurrentSheet As Worksheet, SheetToFreeze As Worksheet, CellToFreezeAt As String
  ' Store the current sheet so we can go back to it
  Set CurrentSheet = ActiveSheet
  ' Set a reference to the sheet that will have its panes frozen
  Set SheetToFreeze = Worksheets("Sheet2")
  ' Set the address of the cell that will be used to freeze the panes at
  CellToFreezeAt = "C3"
  ' Do not let the user see what is happening
  Application.ScreenUpdating = False
  ' Go to sheet that is to be frozen
  SheetToFreeze.Select
  ' Activate the cell to freeze at
  Range(CellToFreezeAt).Select
  ' Freeze the sheet
  ActiveWindow.FreezePanes = True
  ' Go back to the original sheet
  CurrentSheet.Select
  ' Let the user see again
  Application.ScreenUpdating = True
End Sub