+ Reply to Thread
Results 1 to 4 of 4

Call command buttons by user-defined names

  1. #1
    Forum Contributor
    Join Date
    09-19-2012
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    137

    Call command buttons by user-defined names

    right now this code calls one in a series of subs based on text from a cell. I want to call command buttons with the same names instead, so that i can use application.caller to not have so many nearly identical sub routines.
    Please Login or Register  to view this content.
    Any suggestions would be greatly appreciated!

    Willardio

  2. #2
    Forum Contributor
    Join Date
    09-19-2012
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    137

    Re: Call command buttons by user-defined names

    Here's the situation: there are command buttons on each page so that users can add a page (43 rows and a page break). Additionally, the macro above is used to call the same set of nearly identical macros for a new page in which to import word documents from other workbooks.

  3. #3
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Call command buttons by user-defined names

    Willardio, please post a copy of the workbook. That would make it easier to understand and write
    If you like my contribution click the star icon!

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Call command buttons by user-defined names

    if they are forms buttons
    Please Login or Register  to view this content.
    if they are activex then you have to use a class or explicitly pass the name of the control-application.caller won't work
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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