View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
The Code Cage Team[_73_] The Code Cage Team[_73_] is offline
external usenet poster
 
Posts: 1
Default auto freeze panes procedure


Does this do what you need?

Sub split_at_Number()
Dim MyCell As Range
For Each MyCell In ActiveSheet.UsedRange
If MyCell < "" And IsNumeric(MyCell) Then
MyCell.Offset(0, 1).Select
ActiveWindow.FreezePanes = True
'With ActiveWindow 'these 4 lines will install a split at the
frozen cell
'.SplitColumn = 0
'.SplitRow = 0
'End With
End If
Next

End Sub
*-Post posted before response, posts merged!*-
There was a small typo in the code!

Sub split_at_Number()
Dim MyCell As Range
For Each MyCell In ActiveSheet.UsedRange
If MyCell < "" And IsNumeric(MyCell) Then
MyCell.Offset(0, 1).Select
ActiveWindow.FreezePanes = True
'With ActiveWindow 'these 4 lines will install a split at the frozen
cell
'.SplitColumn = 0
'.SplitRow = 0
'End With
End If
Next

End Sub


--
The Code Cage Team

Regards,
The Code Cage Team
www.thecodecage.com
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=8033