+ Reply to Thread
Results 1 to 4 of 4

Insert command buttons during macro run

  1. #1
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Question Insert command buttons during macro run

    Hi guys,

    I have a macro that copies data from a worksheet, creates a new worksheet and pastes it onto the new worksheet, then deletes the old sheet.

    I wanted to know if it was possible to have the macro process above create a command button(s) and assign a macro to that button on the newly created worksheet?

    regards
    Jordan

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Insert command buttons during macro run

    Yes but it's rather complicated and seldom necessary.

    Please explain to what purpose ?



  3. #3
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Insert command buttons during macro run

    I have a worksheet output from an external program which is opened in excel - the problem with this data is that it is unsorted and has blank lines, needs a tidy up / formatting etc. I've written the macro to do all of this and it runs upon opening of the workbook.

    I need command buttons to be inserted that will show/hide named ranges below them. i imagine it will be rather difficult to get the location of the buttons correct as the number of rows for each named range varies with each 'report' thus changing the ideal location for the buttons.

    The spreadsheet will be used as a report viewer and excel will eventually be embedded into iexplorer and having these toggle type command buttons would greatly improve the functionality of the spreadsheet.

    Cheerrs

  4. #4
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Insert command buttons during macro run

    ***Bump***

+ 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