CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2001
    Posts
    4

    Excel macros and visual basic

    I am tring to write a little vb program that will load and unload a macro in excel. It suprisingly won't load automatically when initiated. The excel spreadsheet will eventually be loaded in task-scheduler on a specified time basis so I don't really want to use any forms with vb in which I will have to click an actual button. Any ideas on how I should do this?


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Excel macros and visual basic

    If I understand you correctly you want to execute macro when Excel is startted.

    Insert this code into module
    sub Auto_open()
    Your macro
    end sub

    Your macro will run every time you open excel

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

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

Featured