Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Wandering Split

Excel XP & Win XP
I want to split the active window at row 1022. I recorded the following
macro as I did it. Now, when I run that macro, I see no split at row 1022.
I then run the second macro and it says the split is at a variable row,
sometimes 27, other times 31, then 32, etc. The second macro changes it's
split row after every time I run the first macro. I go to the row given by
the second macro and there is no split there. There are no double scroll
bars on the screen. I click on Windows and it shows "Remove Split" implying
that there is a split.
I even bracketed the code in the first macro with EnableEvents code because
I have a number of event macros in the file. Nothing helps.
How can I make this work? Thanks for your time. Otto

Sub SplitWindow()
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1022
End With
End Sub

Sub FindSplit()
MsgBox ActiveWindow.SplitRow
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Wandering Split

Otto,

I never use split (I prefer Freeze Panes) but here's what it looks like to
me. The SplitRow specified can be no higher than the number of rows visible
on your screen. In other words if your screen shows 30 rows, SplitRow
should not be any higher than that. I think that's why it's a function of
the Window, not the Sheet.

With the macro recorder on, I scrolled down to row 100 and split the screen.
When I ran your SplitFind it returned "18", which makes sense because row
100 was 18 down from the top of the screen.

hth,

Doug

"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
I want to split the active window at row 1022. I recorded the following
macro as I did it. Now, when I run that macro, I see no split at row
1022. I then run the second macro and it says the split is at a variable
row, sometimes 27, other times 31, then 32, etc. The second macro changes
it's split row after every time I run the first macro. I go to the row
given by the second macro and there is no split there. There are no
double scroll bars on the screen. I click on Windows and it shows "Remove
Split" implying that there is a split.
I even bracketed the code in the first macro with EnableEvents code
because I have a number of event macros in the file. Nothing helps.
How can I make this work? Thanks for your time. Otto

Sub SplitWindow()
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1022
End With
End Sub

Sub FindSplit()
MsgBox ActiveWindow.SplitRow
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Wandering Split

Doug is correct. You might be able to use SplitVertical and then scroll to
accomplish whatever you were trying to do. You could position the rows so
that the ones you want to work with are in the screen when you initiate the
split by a simple Range("A1015").Activate command. That would put row 1022
in the window and then do the split.. Don't know if this helps, but it is an
option.

"Otto Moehrbach" wrote:

Excel XP & Win XP
I want to split the active window at row 1022. I recorded the following
macro as I did it. Now, when I run that macro, I see no split at row 1022.
I then run the second macro and it says the split is at a variable row,
sometimes 27, other times 31, then 32, etc. The second macro changes it's
split row after every time I run the first macro. I go to the row given by
the second macro and there is no split there. There are no double scroll
bars on the screen. I click on Windows and it shows "Remove Split" implying
that there is a split.
I even bracketed the code in the first macro with EnableEvents code because
I have a number of event macros in the file. Nothing helps.
How can I make this work? Thanks for your time. Otto

Sub SplitWindow()
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1022
End With
End Sub

Sub FindSplit()
MsgBox ActiveWindow.SplitRow
End Sub



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Wandering Split

It is relative to the top row in the window


Sub SplitWindow()
With ActiveWindow
.ScrollRow = 1013
.SplitRow = 10
End With
End Sub

--
Regards,
Tom Ogilvy


"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
I want to split the active window at row 1022. I recorded the following
macro as I did it. Now, when I run that macro, I see no split at row
1022. I then run the second macro and it says the split is at a variable
row, sometimes 27, other times 31, then 32, etc. The second macro changes
it's split row after every time I run the first macro. I go to the row
given by the second macro and there is no split there. There are no
double scroll bars on the screen. I click on Windows and it shows "Remove
Split" implying that there is a split.
I even bracketed the code in the first macro with EnableEvents code
because I have a number of event macros in the file. Nothing helps.
How can I make this work? Thanks for your time. Otto

Sub SplitWindow()
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1022
End With
End Sub

Sub FindSplit()
MsgBox ActiveWindow.SplitRow
End Sub



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Wandering Split

Doug, JL, Tom
Thanks to you all. You gave me an education today. I would never have
figured that one out. Otto
"Otto Moehrbach" wrote in message
...
Excel XP & Win XP
I want to split the active window at row 1022. I recorded the following
macro as I did it. Now, when I run that macro, I see no split at row
1022. I then run the second macro and it says the split is at a variable
row, sometimes 27, other times 31, then 32, etc. The second macro changes
it's split row after every time I run the first macro. I go to the row
given by the second macro and there is no split there. There are no
double scroll bars on the screen. I click on Windows and it shows "Remove
Split" implying that there is a split.
I even bracketed the code in the first macro with EnableEvents code
because I have a number of event macros in the file. Nothing helps.
How can I make this work? Thanks for your time. Otto

Sub SplitWindow()
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1022
End With
End Sub

Sub FindSplit()
MsgBox ActiveWindow.SplitRow
End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove split a split window? Norm New Users to Excel 3 July 19th 08 10:31 PM
2nd split Kevin Excel Discussion (Misc queries) 4 August 17th 07 04:47 PM
split? HotRod Excel Programming 1 November 3rd 05 05:59 PM
Wandering Mouse Allan Excel Discussion (Misc queries) 4 November 3rd 05 10:10 AM
Prevent wandering users cindee Excel Discussion (Misc queries) 2 October 5th 05 08:20 PM


All times are GMT +1. The time now is 02:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"