LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Copying filtered data

What I am trying to do is display filtered comments from a worksheet in a
list box on a form. Once I have applied a filter to a sheet of data the code
below starts. The code works except it shows me all comments. I only want to
see the filtered or Visible comments. How do I step through the filtered
comments? or is there a diffrent way I could go about this?

sub getcomments()
ActiveCell.CurrentRegion.Select
R = Selection.CurrentRegion.Columns(1).SpecialCells(xl Visible).Count
Range("K2").Select
Load CommentForm
num = 1
Do Until ActiveCell.Row R
CommentForm.ListBox1.AddItem (num & ") " & ActiveCell.Value)
ActiveCell.Offset(1, 0).Select
num = num + 1
Loop
If num = 1 Then
CommentForm.ListBox1.AddItem ("No comments")
Else
End If
CommentForm.Show
end sub 'getcomments
 
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
Copying and shifting filtered data by one row & maintaining the da Copy filtered column data & shift row up Excel Discussion (Misc queries) 2 February 27th 08 08:31 PM
copying filtered data in Excel 2007 mlc Excel Discussion (Misc queries) 2 January 7th 08 07:24 PM
Copying filtered data to another worksheet DavidS Excel Worksheet Functions 4 April 7th 07 08:27 PM
Trasnsposing or copying filtered data from one sheet to another Sierras Excel Worksheet Functions 1 January 14th 06 05:24 PM
Copying Filtered Data Shirley Munro Excel Discussion (Misc queries) 1 June 23rd 05 01:18 AM


All times are GMT +1. The time now is 10:39 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"