+ Reply to Thread
Results 1 to 2 of 2

Macro for Slicer for Month's not yet visable

  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    Chandler
    MS-Off Ver
    Excel 2010
    Posts
    5

    Macro for Slicer for Month's not yet visable

    Hi all,
    Thanks in advance for your help. I am new to VBA and have a question. I have a macro that will get a value from a hidden pivot table based on a data validation cell. The purpose of this worksheet is to automate our Trial Balance. The marco is working perfectly right now, however I don"t want to keep updating the macro every month to include the new months that will be coming through the pivot. For example right now we don't have months 9-12 in the GL because they are in the future. My current Macro can only look at the current items in the GL; so every month I will have to go in and add a line like .SlicerItems("9").Selected = False (It's false because the macro below is for March's Trial Balance). I would like to add a statement to the macro, like still look for periods 9-12 but if not available then ignore and if available set to False (March's Marco).

    Is there a way to do this?

    Also, please note I am using a slicer to filter the data in my macro.


    Please Login or Register  to view this content.
    Last edited by Cutter; 08-15-2012 at 05:34 PM. Reason: Added code tags

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Macro for Slicer for Month's not yet visable

    @ jnco903

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

+ 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