+ Reply to Thread
Results 1 to 10 of 10

Can't delete macro button or see code.

  1. #1
    Registered User
    Join Date
    07-21-2010
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    44

    Can't delete macro button or see code.

    I installed a macro button with instructions from this forum but now I can't seem to delete it or find the code in the button. When the button was installed it opened up a "Private" module to enter the code but when I go "Object Browser" using the "VBA Project" filter nothing comes up. I need to modify the code for now and in future remove it.
    Last edited by TryToExcel; 08-12-2010 at 06:48 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Can't delete macro button or see code.

    Hi,

    if it is a command button, the code is most likely in the Sheet module. Activate Design Mode in the Control Toolbox toolbar, then double click the button.

    if it is a forms button, right-click it, then select Assign Macro and click Edit.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Can't delete macro button or see code.

    You haven't bothered responding to the original Thread - i.e marking it solved, clarifying what you needed or even thanking anyone
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    07-21-2010
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Can't delete macro button or see code.

    When I open Control Box I can view the code now so that's solved. There is an arrow there that opens a "Button" that says "Toolbar Options". I click on that and another Button appears that says "Add or Remove Buttons". Clicking on that brings up a double columned menu with the Control Box options but no where am I shown a "Delete" option or one of the options of the control box that would lead me to a Deleting method.

    Danny

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Can't delete macro button or see code.

    When you are in Design Mode, you can just select the button and delete it with the delete key.
    Remember what the dormouse said
    Feed your head

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Can't delete macro button or see code.

    Oh! Then right-click the toolbar, choose Customize..., then right-click the button and choose Delete (or you can just drag it off the toolbar)

  7. #7
    Registered User
    Join Date
    07-21-2010
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Can't delete macro button or see code.

    I deleted the Contro Toolbox button and created buttons from the FORMS toolbar which is easier. What is the difference in the operation of the buttons in the different ways the buttons are made. Also, I can't see the code for the FORMS button. Does it simply reference the macro that is assigned to it, and if so, do I only need to change the code in my original macro to change the action of the button. When I get these last questions answered I'll mark the post "SOLVED" since all issues will be cleared up.

    Danny

  8. #8
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Can't delete macro button or see code.

    ActiveX controls (from the control toolbox) have more properties and events you can use; forms controls are simpler and more stable. They just have macros assigned to them, so yes if you alter the macro, the button behaviour changes.

  9. #9
    Registered User
    Join Date
    07-21-2010
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Can't delete macro button or see code.

    One answer uncovers another question. When you say that ActiveX controls from the control toolbox buttons have more properties and events that you can use is this the kind of button that allows additional features for a more complex usage other than maybe simple macro that does number crunching, and if so can you steer me to a link, if there is one, regarding the extended use of these controls. This should be the last question in this thread. I find the reference links that are given in replies zero right in on the info that I am looking for.

    Thanks for the assistance.

    Danny

  10. #10
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Can't delete macro button or see code.

    No. The code you can run from them is the same, it's just that you can format the ActiveX ones (e.g. changing Font, Colour etc) and you have more events that can trigger the code. Forms controls just react to one thing; ActiveX ones have several events.

+ 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