Help with macro on displaying

  • Thread starter Thread starter Pete Provencher
  • Start date Start date
P

Pete Provencher

Using Excel 2000:

I would like to setup a macro that will place split panes (which I know how
to do) but then I want the first 6 rows to display in the top pane and row 7
to start at the top of the second pane. I just can't seem to figure this one
out. I'm new to vba and writing macros.

Pete Provencher
 
Hi Pete

i just used the recorder to get this:

With ActiveWindow
.SplitColumn = 0
.SplitRow = 6
End With

should work for you

Cheers
JulieD
 
Hi Pete,

Try this

With ActiveWindow
.SplitColumn = 0
.SplitRow = 6
End With


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
I have gotten this part. I should have explained better. What I.m trying to
do is if they have view the spreadshhet and scrolled down or to the left and
saved it I want to be able to run my macro and have the page revert so that
the first 6 rows are displayed in the upper pane and the lower pane returns
back to row 7 as the first row in the lower pane.

Pete Provrencher
 
I have gotten this part. I should have explained better. What I.m trying to
do is if they have view the spreadshhet and scrolled down or to the left and
saved it I want to be able to run my macro and have the page revert so that
the first 6 rows are displayed in the upper pane and the lower pane returns
back to row 7 as the first row in the lower pane.

Pete Provrencher
 
Sub Auto+Open()

With ActiveWindow
.SplitColumn = 0
.SplitRow = 6
End With
Activbesheet.Range("A7").Select

End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Sub TesterAAAA()
Range("A7").Select

With ActiveWindow
.SplitColumn = 0
.SplitRow = 6
.Panes(1).ScrollRow = 1
.Panes(1).ScrollColumn = 1
.Panes(2).ScrollRow = 7
.Panes(2).ScrollColumn = 1
End With
End Sub

Depending on when you want this to happen, call it from Workbook_Open event
or BeforeSave, or what is appropriate.
 
When I did this the bottom pane displays row 1 as the firsr row in the
bottom pane. I wan it to display row 7 as the first row in the bottom pane.

Pete Provencher
 
Sub TesterAAAA()
Range("A7").Select

With ActiveWindow
.SplitColumn = 0
.SplitRow = 6
.Panes(1).ScrollRow = 1
.Panes(1).ScrollColumn = 1
.Panes(2).ScrollRow = 7
.Panes(2).ScrollColumn = 1
End With
End Sub

Depending on when you want this to happen, call it from Workbook_Open event
or BeforeSave, or what is appropriate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top