+ Reply to Thread
Results 1 to 2 of 2

using automatic macros or object macros

  1. #1
    Momo
    Guest

    using automatic macros or object macros

    hello,

    i tried using the following code in a command button macro
    *************************************
    Sheets("Pivot of Data Collection").Select
    ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
    Sheets("Download Pivot").Select
    ActiveSheet.PivotTables("PivotTable3").PivotCache.Refresh

    *************************************
    and also in a worksheet, worksheet activate and then when i changed
    worksheet or clicked the command button it threw an error at me when it tried
    to run the macro, it doesn't seem to be able to use the code above

  2. #2
    Tom Ogilvy
    Guest

    Re: using automatic macros or object macros

    The code worked fine for me in a comandbutton click event. (only place
    tested).

    xl2002
    --
    Regards,
    Tom Ogilvy


    "Momo" <[email protected]> wrote in message
    news:[email protected]...
    > hello,
    >
    > i tried using the following code in a command button macro
    > *************************************
    > Sheets("Pivot of Data Collection").Select
    > ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
    > Sheets("Download Pivot").Select
    > ActiveSheet.PivotTables("PivotTable3").PivotCache.Refresh
    >
    > *************************************
    > and also in a worksheet, worksheet activate and then when i changed
    > worksheet or clicked the command button it threw an error at me when it

    tried
    > to run the macro, it doesn't seem to be able to use the code above




+ 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