+ Reply to Thread
Results 1 to 7 of 7

How to set default month while auto filtering assistance

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    How to set default month while auto filtering assistance

    Hi friends,

    I want to set a default value of month while filtering as a current month only. I don’t want to enter a month number manually. It should be automatic as per the system date.
    I’m getting error ‘aurgument not optional.

    Please Login or Register  to view this content.
    Any help will be highly appreciated.

    Thanking you in anticipation.
    Last edited by mso3; 06-21-2016 at 10:19 PM.
    Sincerely,

    mso3

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365
    Posts
    20,506

    Re: How to set default month while auto filtering assistance

    When you get the error message and click on debug, which line of code is highlighted? Knowing this will help to resolve the error message. You should do this everytime you get an error message so that you understand where the error is.

  3. #3
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to set default month while auto filtering assistance

    I'm getting error on the following line:

    Please Login or Register  to view this content.
    How to set a current month by code? Error on the 'month()'

    Thank you.

  4. #4
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to set default month while auto filtering assistance

    Bump!

    Any idea or solution please!

    Thank you.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365
    Posts
    20,506

    Re: How to set default month while auto filtering assistance

    Here is a short macro that you can adapt as needed: It takes the current date and provides you with the integer month.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,876

    Re: How to set default month while auto filtering assistance

    This will do.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,876

    Re: How to set default month while auto filtering assistance

    You're welcome and thanks for the rep.

+ 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. [SOLVED] Assistance with Filtering out -m- tags from a Index
    By AceForSale in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 03-24-2016, 06:04 PM
  2. [SOLVED] Auto instert Month names for This month, Last month and Next month
    By hemal89 in forum Word Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2013, 12:01 PM
  3. [SOLVED] Help with a system to auto populate month names based on current month
    By rosboy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2012, 05:17 PM
  4. [SOLVED] Auto populate cells from data in a 6 month range starting with the current month
    By ecarnley349 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-21-2012, 07:32 PM
  5. Excel VBA filtering assistance
    By tonypanda in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-26-2012, 04:46 AM
  6. Would like to ask assistance in filtering multiple pivots at the same time
    By polaro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2005, 09:57 PM
  7. Filtering assistance
    By Ted Metro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-16-2005, 07:06 PM

Tags for this Thread

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