+ Reply to Thread
Results 1 to 3 of 3

How To execute a button (click event) with code?

  1. #1
    Registered User
    Join Date
    02-14-2006
    Posts
    75

    Lightbulb How To execute a button (click event) with code?

    Hi all my question is simple i have a Sheet Named GENERAL
    in this sheet i have a button named INIT
    also have 8 sheets more, named: Sheet1, ... Sheet8 in each Sheet i have a button(with a macro(CodeVBA)).

    My question is in the Sheet GENERAL in button INIT how to execute the Click event of Each Button in each Sheet?

    Thanks

  2. #2
    Registered User
    Join Date
    02-14-2006
    Posts
    75

    Re: How To execute a button (click event) with code?

    i try:
    Please Login or Register  to view this content.
    'In this line i get an error:
    Sheets(i).Ejecutar_Click
    Last edited by Leith Ross; 10-23-2014 at 09:19 PM. Reason: Added Code Tags

  3. #3
    Registered User
    Join Date
    02-14-2006
    Posts
    75

    Re: How To execute a button (click event) with code?

    Show me that some sheets havent buttons but, YES have 1 button how to check?

    Please Login or Register  to view this content.
    i checked and need pass the Sheet name as parameter because the button on each Sheet have this VBA code:

    Please Login or Register  to view this content.
    then i need in this VBA code:


    Please Login or Register  to view this content.
    Run .Buttons("Ejecutar").OnAction

    i need pass the Sheet name because, i use ActiveSheet.

    see this image: View image: excel1

    Thanks

+ 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. Click v double click event code
    By Greg J in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2014, 04:08 AM
  2. Call button click event from a button on anther sheet
    By ajaykgarg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-25-2010, 09:27 AM
  3. Add Code To Button Click Event Using VBA
    By chergh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2009, 06:24 AM
  4. Execute code from the Worksheet_Change event
    By aldredd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2008, 05:52 AM
  5. Execute code after printing with the BeforePrint event
    By mikeburg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2005, 02:05 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