+ Reply to Thread
Results 1 to 3 of 3

ActiveCell.Rows(row number.Hidden returns false when row is hidden sometimes

  1. #1
    Registered User
    Join Date
    01-28-2014
    Location
    seattle
    MS-Off Ver
    Excel 2007
    Posts
    22

    ActiveCell.Rows(row number.Hidden returns false when row is hidden sometimes

    I am trying to implement a very simple user form that has previous and next buttons to navigate through sheet that has rows filtered out.

    I was hoping to use the Hidden property to let me know whether to select an unfiltered (visible) row or not. However, sometimes it is returning False on a row that is not visible. I can not figure out why. it also seems dependent on where the active selection is. For example, if Rows 35 and 40 are visible, and selection is on row 40, then it returns False if I test for row 36.

    If selection is on row 35, it does correctly return true for row 36.

    Here's some basic test code I wrote to try and figure out how Hidden works:

    Please Login or Register  to view this content.
    I can attach a simple file if you think it's dependent on my particular data.

    Thanks!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: ActiveCell.Rows(row number.Hidden returns false when row is hidden sometimes

    Here's a technique I just confirmed is working:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: ActiveCell.Rows(row number.Hidden returns false when row is hidden sometimes

    ActiveCell.Rows(36) is the cell 35 rows below the active cell. If the ActiveCell is B10, ActiveCell.Rows(36) is B45
    ActiveSheet.Rows(36) is row 36 of the active sheet.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Keep hidden rows hidden, in a protected, filtered worksheet
    By djp630 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2014, 10:22 PM
  2. [SOLVED] ActiveCell.Offset excluding hidden rows
    By sleepa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2013, 09:37 AM
  3. How can I do number series excluding the hidden rows?
    By Maryam in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 10-16-2008, 01:57 AM
  4. Replies: 2
    Last Post: 07-20-2006, 02:51 PM
  5. Keeping Hidden Rows/Columns Hidden?
    By DMac in forum Excel General
    Replies: 0
    Last Post: 01-17-2005, 08:13 PM

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