+ Reply to Thread
Results 1 to 4 of 4

Deleting multiple Macro buttons

  1. #1
    Ant
    Guest

    Deleting multiple Macro buttons

    I have a workbook with many macro buttons on different sheets. Each month I
    run a macro to create a hardcopy version and wonder if there is an easy way
    (VBA) to delete/remove all macro buttons from the workbook.

    Is this possible?

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Sub clearbuttons()
    Worksheets("Sheet2").Buttons.Delete

    End Sub

  3. #3
    Ant
    Guest

    Re: Deleting multiple Macro buttons

    So...if the buttons are on multiple sheets should I use sheets array?

    "davesexcel" wrote:

    >
    > Sub clearbuttons()
    > Worksheets("Sheet2").Buttons.Delete
    >
    > End Sub
    >
    >
    > --
    > davesexcel
    > ------------------------------------------------------------------------
    > davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
    > View this thread: http://www.excelforum.com/showthread...hreadid=528019
    >
    >


  4. #4
    Scott
    Guest

    Re: Deleting multiple Macro buttons

    The easiest way to do this would be to just to record a new macro. Start
    recording, flip to whichever buttons you want to get rid of and delete them.
    Once you're done, stop the macro and tidy up the code. You could even just
    leave it leave it the way it is if you're not sure of what you're doing.

    "Ant" wrote:

    > So...if the buttons are on multiple sheets should I use sheets array?
    >
    > "davesexcel" wrote:
    >
    > >
    > > Sub clearbuttons()
    > > Worksheets("Sheet2").Buttons.Delete
    > >
    > > End Sub
    > >
    > >
    > > --
    > > davesexcel
    > > ------------------------------------------------------------------------
    > > davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
    > > View this thread: http://www.excelforum.com/showthread...hreadid=528019
    > >
    > >


+ 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