<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
 "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">

<channel>
<title>XL-Logic.com</title>
<link>http://XL-Logic.com</link>
<description>XL-Logic.com</description>
<language>en-us</language>

<item>
<title>Using Window Panes to Define Work Range</title>
<link>http://XL-Logic.com/modules.php?name=News&amp;file=article&amp;sid=2</link>
<description>&lt;div&gt;I often find myself in the following situation.&amp;nbsp; I have a database sheet or output page for a macro that has header rows, columns or both.&amp;nbsp; My macro needs to send output to this database-type sheet.&amp;nbsp; Somehow in my code I need to define the output range as the area of the worksheet that does not include the header rows or columns.&lt;br&gt;&lt;br&gt;Instead of defining a workbook named range, I started playing around with the idea of defining the work area by referencing the non-frozen part of the active window frame.&amp;nbsp; The following simple macro pastes a list of all defined workbook names to the active worksheet.&amp;nbsp; If you use Freeze Panes to allow the header rows and columns to stay visible, the data is always output to the non-frozen pane.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;Private Sub Paste_Name_List()&lt;/strong&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim n As Integer&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim WorkArea As Range&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;'&amp;nbsp;&amp;nbsp; Define the work area range&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n = ActiveWindow.Panes.Count&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set WorkArea = ActiveWindow.Panes(n).VisibleRange&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;'&amp;nbsp;&amp;nbsp; Clear the work area&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WorkArea.ClearContents&lt;br&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;strong&gt;'&amp;nbsp;&amp;nbsp; Paste list of defined workbook names&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WorkArea.ListNames&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;End Sub&lt;br&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;</description>
</item>

</channel>
</rss>