Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default How do I find the first unfrozen row in Excel using VBA?

This is probably so easy but I'm more experianced in VBA for Word. I have a
large workbook (33 sheets) that is used as a template. Each sheet is frozen
at a different line, due to informaton above the freeze point that is
different for each sheet. I need to determine what the first unfrozen row is
for formatting purposes, but for the life of me can't figure it out. Is
there an equivilent to "SplitRow" like "FreezeRow" or do I have to try and do
something wierd like "SendKeys(^{HOME})"?

Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default How do I find the first unfrozen row in Excel using VBA?

Sub di()
MsgBox ActiveWindow.SplitRow
MsgBox ActiveWindow.SplitColumn
End Sub

"SteveC" wrote:

This is probably so easy but I'm more experianced in VBA for Word. I have a
large workbook (33 sheets) that is used as a template. Each sheet is frozen
at a different line, due to informaton above the freeze point that is
different for each sheet. I need to determine what the first unfrozen row is
for formatting purposes, but for the life of me can't figure it out. Is
there an equivilent to "SplitRow" like "FreezeRow" or do I have to try and do
something wierd like "SendKeys(^{HOME})"?

Thanks,

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default How do I find the first unfrozen row in Excel using VBA?

Should have noted that the first unfrozen row will be the next one down.

Sub di()
MsgBox ActiveWindow.SplitRow
firstUnfrozenRow = ActiveWindow.SplitRow + 1
End Sub

"SteveC" wrote:

This is probably so easy but I'm more experianced in VBA for Word. I have a
large workbook (33 sheets) that is used as a template. Each sheet is frozen
at a different line, due to informaton above the freeze point that is
different for each sheet. I need to determine what the first unfrozen row is
for formatting purposes, but for the life of me can't figure it out. Is
there an equivilent to "SplitRow" like "FreezeRow" or do I have to try and do
something wierd like "SendKeys(^{HOME})"?

Thanks,

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default How do I find the first unfrozen row in Excel using VBA?

Thanks for responding, but I tried that. It always returns "1" since
SplitRow appears to be dependent on window visibility i.e. I do
<Window/Freeze Panes at row 75 with row 63 as the first visible row at the
top. ActiveWindow.SplitRow returns 12.

Currently I'm ensuring that only the last row of the frozen pane is visible
and then doing:

beginRow = ActiveWindow.Panes(1).ScrollRow + 1

Provided the template dosen't get changed this works, but I was hoping for a
more robust solution that didn't depend on visibility.

Thanks again.

"JLGWhiz" wrote:

Should have noted that the first unfrozen row will be the next one down.

Sub di()
MsgBox ActiveWindow.SplitRow
firstUnfrozenRow = ActiveWindow.SplitRow + 1
End Sub

"SteveC" wrote:

This is probably so easy but I'm more experianced in VBA for Word. I have a
large workbook (33 sheets) that is used as a template. Each sheet is frozen
at a different line, due to informaton above the freeze point that is
different for each sheet. I need to determine what the first unfrozen row is
for formatting purposes, but for the life of me can't figure it out. Is
there an equivilent to "SplitRow" like "FreezeRow" or do I have to try and do
something wierd like "SendKeys(^{HOME})"?

Thanks,

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
Can't find the FIND in Excel nancy Excel Discussion (Misc queries) 4 March 20th 08 05:28 AM
Find formatting doesn't work: "Excel cannot find data" Kasama Excel Discussion (Misc queries) 1 August 18th 06 01:40 PM
Despite data existing in Excel 2002 spreadsheet Find doesn't find AnnieB Excel Discussion (Misc queries) 1 June 16th 06 02:15 AM
How do I freeze a pane on Excel but leave one line unfrozen? Paul S Excel Discussion (Misc queries) 2 November 15th 05 06:48 PM
How do I find a file/spreadsheet that Excel says is Already open but I can't find it? nwtrader8 Excel Discussion (Misc queries) 5 June 21st 05 02:16 PM


All times are GMT +1. The time now is 04:56 PM.

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

About Us

"It's about Microsoft Excel"