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

    visual basic and excel

    I need to be able to open excel and automatically save. I have created a macro to save, but then how do I go about calling the macro. The whole process needs to be automated. I will be using task-scheduler to call the excel document, but I just don't know how to automatically save the document when open. Any ideas? I also can not use the add-in save feature that excel offers...


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

    Re: visual basic and excel

    You can execute a macro by sending keys

    'AppActivate "Microsoft Excel"
    SendKeys "^(+G)" 'Control-Shift-G ->execute macro


    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