<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: VBA to Filter Chart Data Range</title>
	<atom:link href="http://peltiertech.com/WordPress/vba-to-filter-chart-data-range/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress/vba-to-filter-chart-data-range/</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Wed, 23 May 2012 11:03:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/vba-to-filter-chart-data-range/comment-page-1/#comment-17492</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Sun, 09 Aug 2009 13:45:29 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=1147#comment-17492</guid>
		<description>Kapil -

That&#039;s a broad topic which I&#039;ve covered in many posts and web pages. I recommend searching the site for &quot;scrollbar&quot; or &quot;scroll bar&quot;.</description>
		<content:encoded><![CDATA[<p>Kapil -</p>
<p>That&#8217;s a broad topic which I&#8217;ve covered in many posts and web pages. I recommend searching the site for &#8220;scrollbar&#8221; or &#8220;scroll bar&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kapil bhardwaj</title>
		<link>http://peltiertech.com/WordPress/vba-to-filter-chart-data-range/comment-page-1/#comment-17484</link>
		<dc:creator>Kapil bhardwaj</dc:creator>
		<pubDate>Sun, 09 Aug 2009 08:39:44 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=1147#comment-17484</guid>
		<description>hello sir,

I have seen your code for making a chart for filter data..

Now I want to use a scroll bar in this logic itself. can you guide me how to do that.</description>
		<content:encoded><![CDATA[<p>hello sir,</p>
<p>I have seen your code for making a chart for filter data..</p>
<p>Now I want to use a scroll bar in this logic itself. can you guide me how to do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/vba-to-filter-chart-data-range/comment-page-1/#comment-10373</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Sun, 15 Feb 2009 14:41:17 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=1147#comment-10373</guid>
		<description>You got confused with the textbox labeling and the index j and so forth, but here is a more detailed approach.

In each TextBox change event procedures you should call a separate sorting routine, and pass information about the textbox control to the routine.

&lt;pre class=&quot;vbasmall&quot;&gt;Private Sub FilterList(iCtrl As Long, sText As String)
    Dim iRow As Long
    Dim sCrit As String
   
    &#039;Add asterisks around text for all matches
    &#039;UCase is used to make filter case-insensitive
    sCrit = &quot;*&quot; &amp; UCase(sText) &amp; &quot;*&quot;
   
    With Me.lbxCustomers
        &#039;Start with a fresh list
        .List = vaCustNames
        &#039;Loop through the list backward - always a good
        &#039;idea when you&#039;re deleting stuff
        For iRow = .ListCount - 1 To 0 Step -1
            &#039;Remove the line if it doesn&#039;t match
            &#039;UCase used again here
            If Not UCase(.List(iRow, iCtrl)) Like sCrit Then
                .RemoveItem iRow
            End If
        Next iRow
    End With
End Sub&lt;/pre&gt;

Here is what the event procedure would look like this:

&lt;pre class=&quot;vbasmall&quot;&gt;Private Sub TextBox1_Change()
    FilterList 1, Me.TextBox1.Text
End Sub&lt;/pre&gt;

Your textboxes should be labeled starting with 0 (not 1) so that the textbox numbering matches the column numbering in the listbox, which is 0-based.</description>
		<content:encoded><![CDATA[<p>You got confused with the textbox labeling and the index j and so forth, but here is a more detailed approach.</p>
<p>In each TextBox change event procedures you should call a separate sorting routine, and pass information about the textbox control to the routine.</p>
<pre class="vbasmall">Private Sub FilterList(iCtrl As Long, sText As String)
    Dim iRow As Long
    Dim sCrit As String

    'Add asterisks around text for all matches
    'UCase is used to make filter case-insensitive
    sCrit = "*" &#038; UCase(sText) &#038; "*"

    With Me.lbxCustomers
        'Start with a fresh list
        .List = vaCustNames
        'Loop through the list backward - always a good
        'idea when you're deleting stuff
        For iRow = .ListCount - 1 To 0 Step -1
            'Remove the line if it doesn't match
            'UCase used again here
            If Not UCase(.List(iRow, iCtrl)) Like sCrit Then
                .RemoveItem iRow
            End If
        Next iRow
    End With
End Sub</pre>
<p>Here is what the event procedure would look like this:</p>
<pre class="vbasmall">Private Sub TextBox1_Change()
    FilterList 1, Me.TextBox1.Text
End Sub</pre>
<p>Your textboxes should be labeled starting with 0 (not 1) so that the textbox numbering matches the column numbering in the listbox, which is 0-based.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gustavo</title>
		<link>http://peltiertech.com/WordPress/vba-to-filter-chart-data-range/comment-page-1/#comment-10367</link>
		<dc:creator>Gustavo</dc:creator>
		<pubDate>Sun, 15 Feb 2009 12:29:24 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=1147#comment-10367</guid>
		<description>Something like this i tried but it dont work.... any idea???



Private Sub TextBox1_Change()
    
    Dim i As Long
    Dim sCrit As String

    &#039;UCase is used to make filter case-insensitive
    sCrit = &quot;*&quot; &amp; UCase(Me.Controls(&quot;TextBox1&quot; &amp; j).Text) &amp; &quot;*&quot;
        With Me.ListBox1
     filfin = Range(&quot;A65536&quot;).End(xlUp).Row
    .List = Range(&quot;A2:C&quot; &amp; filfin).Value
            For i = .ListCount - 1 To 0 Step -1
        If Not UCase(.List(i), j) Like sCrit Then
                        .RemoveItem i
            End If
        Next i
    End With
    
End Sub</description>
		<content:encoded><![CDATA[<p>Something like this i tried but it dont work&#8230;. any idea???</p>
<p>Private Sub TextBox1_Change()</p>
<p>    Dim i As Long<br />
    Dim sCrit As String</p>
<p>    &#8216;UCase is used to make filter case-insensitive<br />
    sCrit = &#8220;*&#8221; &amp; UCase(Me.Controls(&#8220;TextBox1&#8243; &amp; j).Text) &amp; &#8220;*&#8221;<br />
        With Me.ListBox1<br />
     filfin = Range(&#8220;A65536&#8243;).End(xlUp).Row<br />
    .List = Range(&#8220;A2:C&#8221; &amp; filfin).Value<br />
            For i = .ListCount &#8211; 1 To 0 Step -1<br />
        If Not UCase(.List(i), j) Like sCrit Then<br />
                        .RemoveItem i<br />
            End If<br />
        Next i<br />
    End With</p>
<p>End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/vba-to-filter-chart-data-range/comment-page-1/#comment-10336</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Sun, 15 Feb 2009 03:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=1147#comment-10336</guid>
		<description>Gustavo -

Wow, that was four years ago. I don&#039;t remember writing that, nor do I remember which project I was even working on at the time.

You could adjust the code in the Daily Dose article so it compares a particular column of the listbox to the particular textbox. You would define sCrit something like this:

&lt;pre class=&quot;vbasmall&quot;&gt;sCrit = &quot;*&quot; &amp; UCase(Me.controls(&quot;tbxFind&quot; &amp; j).Text) &amp; &quot;*&quot;&lt;/pre&gt;

then you test the particular item:

&lt;pre class=&quot;vbasmall&quot;&gt;If Not UCase(.List(i), j) Like sCrit Then&lt;/pre&gt;
&#160;</description>
		<content:encoded><![CDATA[<p>Gustavo -</p>
<p>Wow, that was four years ago. I don&#8217;t remember writing that, nor do I remember which project I was even working on at the time.</p>
<p>You could adjust the code in the Daily Dose article so it compares a particular column of the listbox to the particular textbox. You would define sCrit something like this:</p>
<pre class="vbasmall">sCrit = "*" &#038; UCase(Me.controls("tbxFind" &#038; j).Text) &#038; "*"</pre>
<p>then you test the particular item:</p>
<pre class="vbasmall">If Not UCase(.List(i), j) Like sCrit Then</pre>
<p>&nbsp;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gustavo</title>
		<link>http://peltiertech.com/WordPress/vba-to-filter-chart-data-range/comment-page-1/#comment-10327</link>
		<dc:creator>Gustavo</dc:creator>
		<pubDate>Sun, 15 Feb 2009 01:37:50 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=1147#comment-10327</guid>
		<description>Dear Jon,

i have a big dude about a code in vba that you create, you wrote that you can filter a listbox with 6 columns and 6 textboxes please i was reading this for long time and i cant  imagine how you can do that please if you can share the code i will really appreatiate it

thanks in advance


you write this post about this what i was taking 

http://www.dicks-blog.com/archives/2005/02/16/limit-a-listbox/</description>
		<content:encoded><![CDATA[<p>Dear Jon,</p>
<p>i have a big dude about a code in vba that you create, you wrote that you can filter a listbox with 6 columns and 6 textboxes please i was reading this for long time and i cant  imagine how you can do that please if you can share the code i will really appreatiate it</p>
<p>thanks in advance</p>
<p>you write this post about this what i was taking </p>
<p><a href="http://www.dicks-blog.com/archives/2005/02/16/limit-a-listbox/" rel="nofollow">http://www.dicks-blog.com/archives/2005/02/16/limit-a-listbox/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

