+ Reply to Thread
Results 1 to 2 of 2

how to go the the next row when autofilter is activated

  1. #1
    François
    Guest

    how to go the the next row when autofilter is activated

    Hello,
    I would like to use something like activeCell.Offset(1,0).Select when
    autofilter is activated. How do I code this ?

    Many thanks.

    Francois

  2. #2
    Dave Peterson
    Guest

    Re: how to go the the next row when autofilter is activated

    Maybe just looping through the cells??

    Option Explicit
    Sub testme()

    Dim myCell As Range

    Set myCell = ActiveCell
    Do
    Set myCell = myCell.Offset(1, 0)
    If Intersect(myCell, ActiveSheet.AutoFilter.Range) Is Nothing Then
    Set myCell = Nothing
    Exit Do
    End If
    If myCell.EntireRow.Hidden = True Then
    'keep looking
    Else
    Exit Do
    End If
    Loop

    If myCell Is Nothing Then
    MsgBox "No next cell"
    Else
    MsgBox myCell.Value & vbLf & myCell.Address
    myCell.Select
    End If
    End Sub


    François wrote:
    >
    > Hello,
    > I would like to use something like activeCell.Offset(1,0).Select when
    > autofilter is activated. How do I code this ?
    >
    > Many thanks.
    >
    > Francois


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1