+ Reply to Thread
Results 1 to 4 of 4

Autofilter macro once runned, stop and run another macro

Hybrid View

  1. #1
    Registered User
    Join Date
    10-21-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    18

    Autofilter macro once runned, stop and run another macro

    Hi

    my file's username is username1, password is password1.

    For the sheet "Statement of Account', I have an autofilter macro in place. However, I wish to add macro SOA_GST too. The macro for SOA_GST has been written. However, when I run SOA_GST after my autofilter macro has run, the autofilter macro automatically deletes my added in data that is a result of SOA_GST. Please help!

    By the way if it's possible I would not wish to have the macro button in my "Statement of Account" sheet. I wrote the macro to run autofilter, stop it, and then run SOA_GST but it didn't work.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,539

    Re: Autofilter macro once runned, stop and run another macro

    Try changing the SOA_GST macro to this:

    Sub SOA_GST()
    '
    ' SOA_GST Macro
    '
    
    '
    Application.ScreenUpdating = False
    Application.EnableEvents = False
    Range("D15").FormulaR1C1 = "Total"
    Range("E15").FormulaR1C1 = "=SUM(R[-7]C:R[-5]C)"
    Range("D16").FormulaR1C1 = "GST"
    Range("E16").FormulaR1C1 = "=7%*R[-1]C"
    Range("D17").FormulaR1C1 = "Net Total"
    Range("E17").FormulaR1C1 = "=SUM(R[-1]C+R[-2]C)"
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    End Sub

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-21-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Autofilter macro once runned, stop and run another macro

    thank you!!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,539

    Re: Autofilter macro once runned, stop and run another macro

    You're welcome.

+ 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