+ Reply to Thread
Results 1 to 3 of 3

Macro to create Command Button and assign code

  1. #1
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    293

    Macro to create Command Button and assign code

    Attached is a code in progress.

    I am trying to create a workbook that holds the code to create 3 (for now) Command Buttons and their respective codes.

    The purpose is to download my morning report, run the formatting and then apply these 3 command buttons to the new book.

    If my explanation is not clear just ask.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to create Command Button and assign code

    Hello dagindi,

    Have you considered creating a macro enabled template? Recreating the buttons and code seems like copying the workbook. Can't you just create a copy of the workbook?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    293

    Re: Macro to create Command Button and assign code

    I've never heard of a Macro Enabled Template. I'll look into that. I'm not sure if copying the workbook is the best solution. I'll give it a shot when I get back to my office.

    One thing, this macro is only part of the bigger picture.

    When I receive the raw data, I run a macro before this that reformats data, adds info via lookups etc etc.... Then I would put in the command buttons and other functions and then shoot it off to whomever needs it so I'm not sure if just copying the workbook will work.

+ 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