View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Returning reference of frozen cell

I agree with you.



"Rick Rothstein (MVP - VB)" wrote:

Dim X as long
dim Y as long
With ActiveWindow.Panes(4)
Y = .ScrollColumn
X = .ScrollRow
End With


From my quick experiment with this "pane" stuff, I concluded using the
hard-coded 4 might fail if the spreadsheet were only split at the columns
only or the rows only (there would only be 2 panes then). My solution,
applied to your setup would be something like this...

Dim X as long
Dim Y as long
Dim MaxPane as Long
MaxPane = ActiveWindow.Panes.Count
With ActiveWindow.Panes(MaxPane)
Y = .ScrollColumn
X = .ScrollRow
End With

Rick


--

Dave Peterson