+ Reply to Thread
Results 1 to 3 of 3

How to Make macros work automatically on opening the worksheet

  1. #1
    Registered User
    Join Date
    10-29-2005
    Posts
    12

    Exclamation How to Make macros work automatically on opening the worksheet

    Hi All,

    I have a worksheet which contains combox and textboxes i have written a macro to fill the comboboxes with values.

    My problem is this macro works only when i press F5 or if i select the macro and click on the run button.

    Is there a way to automatically run the macro on opening the worksheet.
    if so where/what code to be written to make this process run?

    Plz help me out

  2. #2
    Bob Phillips
    Guest

    Re: How to Make macros work automatically on opening the worksheet


    Private Sub Workbook_Open()
    'your code here
    End Sub

    'This is workbook event code.
    'To input this code, right click on the Excel icon on the worksheet
    '(or next to the File menu if you maximise your workbooks),
    'select View Code from the menu, and paste the code



    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "sjayar" <sjayar.1y83oa_1131528900.7576@excelforum-nospam.com> wrote in
    message news:sjayar.1y83oa_1131528900.7576@excelforum-nospam.com...
    >
    > Hi All,
    >
    > I have a worksheet which contains combox and textboxes i have written a
    > macro to fill the comboboxes with values.
    >
    > My problem is this macro works only when i press F5 or if i select the
    > macro and click on the run button.
    >
    > Is there a way to automatically run the macro on opening the
    > worksheet.
    > if so where/what code to be written to make this process run?
    >
    > Plz help me out
    >
    >
    > --
    > sjayar
    > ------------------------------------------------------------------------
    > sjayar's Profile:

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




  3. #3
    Registered User
    Join Date
    10-29-2005
    Posts
    12
    thank u very much it worked

+ 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