Thread: Freeze Panes
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John[_88_] John[_88_] is offline
external usenet poster
 
Posts: 205
Default Freeze Panes

Hello Darin,

Have a go with the code below (Note that FreezePanes is a property of the
Window object):

Sub SetPaneFreeze()
Dim wks As Worksheet

For Each wks In Application.ActiveWorkbook.Worksheets
If wks.Name = "Master" Then
wks.Select
ActiveWindow.FreezePanes = False
wks.Cells(3, 2).Select
ActiveWindow.FreezePanes = True
Exit For
End If
Next wks

End Sub

Best regards

John


"Darin Kramer" wrote in message
...
Hi,

Im looking for some VB to :

Select the sheet entitled Master.
Remove any Freeze panes formatting.
Goto cell b3, and freeze panes.

I tried using the basic macro recorder, but it doesnt seem to work...???

Any ideas...

Thanks

Darin

*** Sent via Developersdex http://www.developersdex.com ***