I have Excel 2007 and would like to know how to set up a macro that will unfreeze the current panes and freeze another pane for all worksheets in the file I am currently working in. Actually in the current setting, a certain line has been split (View - Split). So need to undo that and freeze panes on another line. I have developed the following code:
Sub Macro1()
Range("E9").Select</SPAN>
With ActiveWindow</SPAN>
.SplitColumn = 0</SPAN>
.SplitRow = 0</SPAN>
End With</SPAN>
Application.ScreenUpdating = False</SPAN>
For Each ws In ThisWorkbook.Worksheets</SPAN>
ws.Activate</SPAN>
With ActiveWindow</SPAN>
.SplitColumn = 4: .SplitRow = 7</SPAN>
.FreezePanes = True</SPAN>
End With</SPAN>
Next
</SPAN>End Sub
When I run this macro, it goes to my "personal" workbook and runs it. How do I save a macro and run it on my the file I am currently in? New to macros, so kindly be detailed.