+ Reply to Thread
Results 1 to 4 of 4

Creating a macro which presses a button containing a recorded macro

  1. #1
    Registered User
    Join Date
    06-26-2005
    Posts
    10

    Creating a macro which presses a button containing a recorded macro

    Is there any way I can create a button which repeatedly click another button containing a macro? If so, please help me as I need it for my school work.

  2. #2
    Bernie Deitrick
    Guest

    Re: Creating a macro which presses a button containing a recorded macro

    Remove the Private keyword from in front of the commandbutton_click event, and use a sub like

    Sub TryNow()
    Dim i As Integer
    For i = 1 To 10
    Sheet1.CommandButton1_Click
    Next i
    End Sub


    --
    HTH,
    Bernie
    MS Excel MVP


    "petros89" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Is there any way I can create a button which repeatedly click another
    > button containing a macro? If so, please help me as I need it for my
    > school work.
    >
    >
    > --
    > petros89
    > ------------------------------------------------------------------------
    > petros89's Profile: http://www.excelforum.com/member.php...o&userid=24645
    > View this thread: http://www.excelforum.com/showthread...hreadid=473343
    >




  3. #3
    Tom Ogilvy
    Guest

    Re: Creating a macro which presses a button containing a recorded macro

    Just repeatedly call the same macro that clicking the button causes to run.

    --
    Regards,
    Tom Ogilvy


    "petros89" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there any way I can create a button which repeatedly click another
    > button containing a macro? If so, please help me as I need it for my
    > school work.
    >
    >
    > --
    > petros89
    > ------------------------------------------------------------------------
    > petros89's Profile:

    http://www.excelforum.com/member.php...o&userid=24645
    > View this thread: http://www.excelforum.com/showthread...hreadid=473343
    >




  4. #4

    Re: Creating a macro which presses a button containing a recorded macro

    add a button in excel worksheet
    right click and select view code

    Private Sub CommandButton1_Click()
    Call macro1
    End Sub


    petros89 yazdi:
    > Is there any way I can create a button which repeatedly click another
    > button containing a macro? If so, please help me as I need it for my
    > school work.
    >
    >
    > --
    > petros89
    > ------------------------------------------------------------------------
    > petros89's Profile: http://www.excelforum.com/member.php...o&userid=24645
    > View this thread: http://www.excelforum.com/showthread...hreadid=473343



+ 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