+ Reply to Thread
Results 1 to 4 of 4

Code to create Macro Button and Assigning Macro code

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Code to create Macro Button and Assigning Macro code

    Hello:

    Please refer to attached file.

    i have below code which successfully create a macro button and assign the macro correctly.
    This is only doing for one sheet and i need to modify the code so that it does for all sheets of the workbook.

    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Code to create Macro Button and Assigning Macro code

    Hi, Riz,

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Code to create Macro Button and Assigning Macro code

    Hi Riz,

    An unrelated comment that may help you in the future after looking at your code:
    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. dim i as Integer). http://www.cpearson.com/excel/DeclaringVariables.aspx


    Nice job Holger.

    Lewis

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Code to create Macro Button and Assigning Macro code

    Hi HiHoBe:

    Your code works great.
    Thanks a lot for such a great help.
    Riz

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to Create Button and assign code
    By swatsp0p in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-06-2014, 12:21 PM
  2. code needed to create macro for button
    By tryingtolearn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2012, 08:24 AM
  3. create control button and assigning it a macro
    By ers in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2012, 01:24 PM
  4. Macro to create Command Button and assign code
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2011, 09:19 AM
  5. Assigning dynamic named ranges to listfillrange via macro code
    By Schwizer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2007, 11:44 AM

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