+ Reply to Thread
Results 1 to 5 of 5

Macro only shows "create" button. Can't run/edit/delete.

  1. #1
    Registered User
    Join Date
    08-02-2013
    Location
    Michigan,USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro only shows "create" button. Can't run/edit/delete.

    This is my first post on any forum EVER. If I am reposting a topic that has already been asked then I apologize and please re-direct me to that thread.
    I found a VBA online from a user that allows me to sort a certain dynamic named range by multiple levels just like you would in a Custom Sort.
    It worked great when I put the code in and clicked the green "play" button. I then closed the VBA editor. When I went back to run the macro by hitting the "Macro" button on the Developer tab, only the "create" button is available. The run/edit/delete buttons are greyed out. I have tried to delete the module in the VBA editor and it disappears from my list of macros. But when I try to recreate another macro with the same code inside, it wont let me run/edit/delete. I tried saving the file and all my other macros seem to work perfectly. The range is "Route1". I am running excel 2007. Sorry for the length post

    Not sure how to post code yet. Here it is:

    Sub R1srt()
    Dim rng As Range

    Set rng = Sheets("Sheet1").Range("Route1")

    With Sheets("Sheet1").Sort

    .SortFields.Clear

    .SortFields.Add Key:=rng.Columns("A:A"), _
    SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    .SortFields.Add Key:=rng.Columns("X:X"), _
    SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    .SortFields.Add Key:=rng.Columns("M:M"), _
    SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal

    .SetRange rng
    .Header = xlGuess
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
    End Sub


    Thanks in advance for any help!! Hopefully if I did something wrong you guys can point it out (im sure someone will)

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,626

    Re: Macro only shows "create" button. Can't run/edit/delete.

    I think the problem is the name of the sub but I've no idea why it's problem.

    Try changing to, say, Rout1Srt.

    Oh, and when you post code can you enclose it in tags.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-02-2013
    Location
    Michigan,USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro only shows "create" button. Can't run/edit/delete.

    That fixed the problem! Thanks for your help. I will definitely use code tags next time.
    Do I have to label this thread as [solved]? If so, how would I do that.

  4. #4
    Registered User
    Join Date
    07-31-2019
    Location
    Sandhurst
    MS-Off Ver
    Professional Plus 2016
    Posts
    1

    Re: Macro only shows "create" button. Can't run/edit/delete.

    Having had this same issue with a macro that had been working perfectly well on a previous version of Excel, I have come to the conclusion that potentially the root cause, which undeniably is the macro name, could be where the first part can be seen as a cell reference...
    My macro was just called MT104 and just renaming this as Format_MT104 it worked fine.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, Suffolk (England), but grew up in Sawley, Derbyshire
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2301 (Windows 11 22H2 64-bit)
    Posts
    65,649

    Re: Macro only shows "create" button. Can't run/edit/delete.

    Administrative Note:

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Create a Command Button to "Save As" and "Close" an Excel Workbook
    By thedunna in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-26-2013, 05:38 PM
  2. Replies: 1
    Last Post: 05-06-2013, 07:02 AM
  3. shows as 2"500'000 but I need to edit it so it will show 2"500 instead
    By Elainefish in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-06-2013, 02:43 AM
  4. [SOLVED] Need a save and close macro that does not care if the "edit workbook" button has be clcked
    By rt3 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-22-2013, 08:42 AM
  5. Replies: 0
    Last Post: 08-24-2005, 04:05 PM

Tags for this Thread

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