+ Reply to Thread
Results 1 to 6 of 6

Help Debug error - object required

  1. #1
    Registered User
    Join Date
    04-15-2014
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2010
    Posts
    15

    Help Debug error - object required

    I'm really new to macros and need help desugging something.
    I recorded a macro that (using the example below) when I click on a button it hides all columns in my sheet except the month of February. Then (this is the bit I'm struggling with) I need to hide all the rows with cells with no fill colour in February's range of cells (here it's H5:K212).

    I don't understand the error really so any help would be appreciated!

    I need to do this with all the months of the year so if I can understand my example month (Feb) then I can adapt the range of cells to suit the others.


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help Debug error - object required

    Please Login or Register  to view this content.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    25,052

    Re: Help Debug error - object required

    Remove the .Select from the line of code.

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Help Debug error - object required

    Try taking out the .select

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-15-2014
    Location
    Lincoln, England
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Help Debug error - object required

    I took the .select out but it still doesn't work. I've attached my sheet to this post, maybe one of you would be so kind as to have a look.

    PA Yearly Servicing Schedule New.xlsm

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,173

    Re: Help Debug error - object required

    It works here.

    I think you can replace all your borders code with just:
    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

+ 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. Debug error help: Method 'Copy' of Object '_Worksheet' failed
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-22-2015, 05:02 AM
  2. [SOLVED] How to Debug-Run Time error- 1004 Application-Defined or object defined error
    By joyhampton in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2014, 05:37 PM
  3. [SOLVED] Simple Calendar pop up macro --> error Run-time error '424': Object required
    By am_hawk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2013, 10:38 AM
  4. Replies: 3
    Last Post: 03-29-2012, 01:58 PM
  5. debug error: object variable not set
    By Michael A in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2005, 09:06 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