Results 1 to 7 of 7

Sort Operation Works when Macros are called manually, but not when VBA calls the Macros

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-01-2019
    Location
    Illinois
    MS-Off Ver
    2016
    Posts
    223

    Sort Operation Works when Macros are called manually, but not when VBA calls the Macros

    I am implementing a Pareto chart for versions of Excel that are olcer than the 2016 version, so I am copying the Pareto values to a 'helper table' and using VBA's sort operations to order the data in descending order of frequency. And everything works fine when I manually run the macros that sort the data for two Pareto charts.

    The problem is that, when I use VBA to run the macros, the sort operation appears to not occur. However, the copy operation still occurs. Also, if I move the copy/sort commands from inside the macro to userform1, the sort operation does not occur.

    I am stymied on how the sort can work when I run the macro manually, yet fail when userform1 runs the same macros. Does anyone know how to corect this behavior so that the numbers in the below graphic are sorted into descending order?
    Untitled.png

    The file is attached.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help condensing macro that calls 8 macros.
    By taylorsm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-08-2017, 11:52 AM
  2. The order of operation of Macros
    By Yoepy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-05-2016, 09:50 PM
  3. [SOLVED] Combining two macros into one simple operation.
    By MagicMan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-06-2015, 08:06 AM
  4. New to Excel macros - Looking for a little help with a loop operation
    By Pwincu20 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2012, 11:40 PM
  5. Macro that calls other macros in different sheets (Mudraker)
    By mlcfexcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2007, 08:56 PM
  6. Macro that calls other macros in different sheets
    By mlcfexcel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-05-2007, 07:44 AM
  7. Return codes from called macros
    By mwc0914 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-05-2006, 02:15 PM

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