+ Reply to Thread
Results 1 to 4 of 4

Excel Macro Help

  1. #1
    Registered User
    Join Date
    11-07-2006
    Posts
    2

    Excel Macro Help

    Hi,

    I am new to Excel Macro programming. I am trying to record a macro that would do subtotals of some data that I have got.

    When I click data->subtotals, I receive a Micorosft excel pop showing some message. I always click "OK" on this box and proceed.

    But this particular step is not getting recorded. Whenever I play the Macro recorded, it stops here and waits for me to click the "OK" button.

    Can anyone please tell me how to work around this problem.

    Thanks
    Andy

  2. #2
    Registered User
    Join Date
    07-22-2005
    Location
    canada
    Posts
    73

    post the macro code, and we'll see what we can see.

    To get an idea of what is happening, it's best that you post the macro code. It's too hard to troubleshoot otherwise.

    Oliver.

  3. #3
    Registered User
    Join Date
    11-07-2006
    Posts
    2
    Please find below the code for subtotals:

    Selection.Subtotal GroupBy:=1, Function:=xlCount, TotalList:=Array(1), _
    Replace:=True, PageBreaks:=False, SummaryBelowData:=True
    End Sub


    But I get the Microsoft message box after this step which is not getting recorded. It is waiting for me to click the "OK" button and then proceeds.

    Thanks,
    Andy

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by andy_sea
    Please find below the code for subtotals:

    Selection.Subtotal GroupBy:=1, Function:=xlCount, TotalList:=Array(1), _
    Replace:=True, PageBreaks:=False, SummaryBelowData:=True
    End Sub


    But I get the Microsoft message box after this step which is not getting recorded. It is waiting for me to click the "OK" button and then proceeds.

    Thanks,
    Andy
    Does the macro you run include the setting of a Range or ActiveCell? - or did you set that before running the macro, and What is the error message?

    ---
    Si fractum non sit, noli id reficere.

+ 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