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: 550
Default Visible Rows Indexing

In a quagmire again.......

Triying to index down through visible rows on a filtered range.

The code:

Private Sub UserForm_Activate()
With ActiveCell
nVisRow = Range(.Offset(RemindLBI_No), Cells(65536, .Column)) _
.SpecialCells(xlCellTypeVisible).Cells(1).Row
TextBox1.Value = Worksheets("Reminders").Range("A" & nVisRow)
TextBox2.Value = Worksheets("Reminders").Range("B" & nVisRow)
End With
End Sub

ActiveCell is always Range ("A5") <the header row
"RemindLBI_No" is the ListBox Index number (from a ListBox on another
UserForm)

Here's the problem......
Let's say that my filter leaves rows 8, 10 & 12 visible.
If I select the first item in the ListBox.Index = 1) it works fine.
(nVisRow = 8)
If I select the second item, (ListBox.Index = 2) it still works.
(nVisRow = 10)
If I select the last item, (ListBox.Index = 3), it doesn't work.
(nVisRow = 10)

I understand why the above doesn't work but am at a loss to find a
workaround.
In essence, starting from row 5, I need to get the row number of the 3rd

visible row below row 5.

TIA for any insight into getting this to work,
John



 
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
Deleting Visible Rows Confused Excel Discussion (Misc queries) 4 August 7th 08 02:44 PM
Hide a visible rows Wanna Learn Excel Discussion (Misc queries) 5 February 15th 07 08:23 PM
Indexing/Polulating Rows traceydee150 Excel Worksheet Functions 0 May 2nd 06 06:03 PM
List Box Visible Rows Only John Wilson Excel Programming 5 October 28th 03 07:50 PM
AutoFilter - which rows are currently visible? Bjørnar Hartviksen Excel Programming 2 October 6th 03 12:01 AM


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