-
I think you can only get the data of row 2 if i use that code. but thanks for that because i can manipulate that to attain what i need.
[VBA]Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r As Range, rw As Range, i As Long, j As Long
Set r = ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisible)
If r.Rows.Count < 1 Then Exit Sub
For Each rw In r.Rows
j = j + 1
If j = Target.Row Then
Set r = rw
Exit For
End If
Next rw
For i = 1 To 5
UserForm1.Controls("Textbox" & i).Value = Cells(r.Row, i)
Next i
End sub[/VBA]
Last edited by jov_damo86; 07-24-2012 at 08:01 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules