+ Reply to Thread
Results 1 to 6 of 6

Enabling/Disabling a Series of Macros Buttons

  1. #1
    Registered User
    Join Date
    01-26-2007
    Posts
    3

    Enabling/Disabling a Series of Macros Buttons

    I have a spreadsheet with a series of distinct macro buttons. It is essential that each button is used only once and in sequential order.

    Is it possible to have the first enabled, then once it is used, disabling it and enabling only the next in the sequence and so forth until the buttons are exhausted?

    Thank you to anyone who can help.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    In principle yes

    You can use macros to clear the text on a button

    ActiveSheet.Shapes("Button 1").Characters.Text = "asdsad"

    and assign/unassign macros

    ActiveSheet.Shapes("Button 1").OnAction = "Macro1"

    I don't believe that there is an 'enabled' property that you can set.
    Martin

  3. #3
    Registered User
    Join Date
    01-26-2007
    Posts
    3
    Not sure I know what you mean, can you give a non-VB walkthrough or example?

  4. #4
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    I hate do try to explain what someone else is thinking ... but, I'll try anyway.

    I think what mrice is suggesting is that you can have only one button. You can change the text on that one button, change what macro it runs (and even move it, so that it appears to be a "different" button). That is way to ensure that someone does not click button 2 before they click button1.

    Another way is to keep the multiple buttons you already have, but make them invisible until the appropriate time.

    Another way is to keep the multiple buttons you already have, but do not attach them to a macro until the previous button is clicked.

    By the way, how did you create your buttons? I know of at least 3 different ways, and the details of how you handle them (and how they appear to users) is quite different.

    Even as I was typing this, a 4th way came to mind. So, we will probably need to know more about the specifics in your case to be able to give specific recommendations.

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    You explained very well

  6. #6
    Registered User
    Join Date
    01-26-2007
    Posts
    3
    I have one macro recorded right now and it is assigned to a 'Button' (that is what is says in the info box when I scroll over it).

    From reading your posts, mrp... it sounds like either of:

    1)Another way is to keep the multiple buttons you already have, but make them invisible until the appropriate time.
    -- How do I make them invisible?

    2)Another way is to keep the multiple buttons you already have, but do not attach them to a macro until the previous button is clicked.
    -- This might work, but I would have to unattach the macro from the previous button in the next correct?

    Sorry about the cumbersomeness of this... taking over a project from someone else and am trying to find a way to not have to start from scratch.

    Thanks again.
    Last edited by justincade; 02-05-2007 at 04:43 PM.

+ 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