+ Reply to Thread
Results 1 to 3 of 3

Thread: Buttons

  1. #1
    april27
    Guest

    Buttons

    I have made a button in the ordinary Excel-interface by using
    View>Toolbars>Forms. The button is supposed to call a larger program that I
    have in a modul. However, I fail to connect the button to the macro. The
    button is placed in Sheet1. In VisualBasic for Sheet1 I have the following
    code:

    Private Sub main_program_button_Click()
    Call mainProgram
    End Sub

    The main program is found in the modul. Since I created the button in Excel
    I do not know how to get the code descibed above to connect to the button.
    Please help needed!!!

  2. #2
    Paul Mathews
    Guest

    RE: Buttons

    Right-click on the button, choose "Assign macro...", then select the macro
    you want to attach to the button from the macros list.

    "april27" wrote:

    > I have made a button in the ordinary Excel-interface by using
    > View>Toolbars>Forms. The button is supposed to call a larger program that I
    > have in a modul. However, I fail to connect the button to the macro. The
    > button is placed in Sheet1. In VisualBasic for Sheet1 I have the following
    > code:
    >
    > Private Sub main_program_button_Click()
    > Call mainProgram
    > End Sub
    >
    > The main program is found in the modul. Since I created the button in Excel
    > I do not know how to get the code descibed above to connect to the button.
    > Please help needed!!!


  3. #3
    Bob Phillips
    Guest

    Re: Buttons

    Forms buttons are linked via a macro assign. Right-click the button, and
    select Assign Macro from there.

    --

    HTH

    Bob Phillips

    (replace xxxx in the email address with gmail if mailing direct)

    "april27" <april27@discussions.microsoft.com> wrote in message
    news:EBB1967D-C469-4A4B-946B-9CAF58EE9635@microsoft.com...
    > I have made a button in the ordinary Excel-interface by using
    > View>Toolbars>Forms. The button is supposed to call a larger program that

    I
    > have in a modul. However, I fail to connect the button to the macro. The
    > button is placed in Sheet1. In VisualBasic for Sheet1 I have the following
    > code:
    >
    > Private Sub main_program_button_Click()
    > Call mainProgram
    > End Sub
    >
    > The main program is found in the modul. Since I created the button in

    Excel
    > I do not know how to get the code descibed above to connect to the button.
    > Please help needed!!!




+ 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.2.0