+ Reply to Thread
Results 1 to 3 of 3

to run a macro automatically on opening a workbook

  1. #1
    Forum Contributor
    Join Date
    08-28-2010
    Location
    delhi,india
    MS-Off Ver
    Excel 2007
    Posts
    128

    to run a macro automatically on opening a workbook

    Hi all,
    I have a workbook containing a macro.I am opening this workbook from other workbook.
    I want that when i open the workbook, my macro in opened workbook runs automatically as soon as it is opened.

  2. #2
    Registered User
    Join Date
    10-31-2007
    Posts
    34

    Re: to run a macro automatically on opening a workbook

    Hi kmlprtsngh,

    Go to VBE and click on thisworkbook under project explorer panel on the left.

    Private Sub Workbook_Open()
    your code
    End Sub
    Copy the above and put your code inside it.

    Cheers
    HS TS VN

  3. #3
    Forum Contributor
    Join Date
    08-28-2010
    Location
    delhi,india
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: to run a macro automatically on opening a workbook

    Thanks, you are great.

+ 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