Results 1 to 2 of 2

Thread: Runnng Excel Macro in VB Code

  1. #1

    Thread Starter
    Addicted Member tcurrier's Avatar
    Join Date
    May 1999
    Location
    Northeastern Pa./USA
    Posts
    255

    Runnng Excel Macro in VB Code

    I am able to open a new Excel worksheet in my VB code, but I want to
    automatically run an Excel macro when it opens.

    I tried this code:

    xl.Application.Run "personal.xls!activea"
    xl.Application.Run "activea"


    But it says that it can't find my macro... Does anyone have an idea
    how I can tell the program where to find my macro ?

    Thanks ! b
    VB6 Enterprise SP4

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Runnng Excel Macro in VB Code

    Call it Auto_Open. Read about it here:

    http://office.microsoft.com/en-us/as...346281033.aspx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width