+ Reply to Thread
Results 1 to 2 of 2

Automate a button click event

  1. #1
    JD
    Guest

    Automate a button click event

    I am new to Excel programming .
    I have a VB project that fills an Excel spreadsheet and upon completion it
    becomes visible. However I need to make changes in one column. I created a
    button that the user clicks and the entries change.
    How do I get a button click event to fire automatically when the form
    activates after the spreadsheet has been filled.

    thanks



  2. #2
    Jim Thomlinson
    Guest

    RE: Automate a button click event

    Is your button from the Control Toolbox or from the forms toolbar. Buttons
    from the control toolbox write their code right in the sheet upon which they
    are placed and are actual buttons with properties... Buttons from the Forms
    toolbar are more like pictures of buttons and are attached to code written in
    modules.

    If from the control toolbox then in the sheet you will have private button
    click event code. Change this procedure from private to public and you can
    just call it like any other procedure, kinda like this.

    Sheet1.CommandButton1_Click()

    If from the forms tool bar then just reference the module code kinda like
    this...

    module1.MySub
    --
    HTH...

    Jim Thomlinson


    "JD" wrote:

    > I am new to Excel programming .
    > I have a VB project that fills an Excel spreadsheet and upon completion it
    > becomes visible. However I need to make changes in one column. I created a
    > button that the user clicks and the entries change.
    > How do I get a button click event to fire automatically when the form
    > activates after the spreadsheet has been filled.
    >
    > thanks
    >
    >
    >


+ 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