Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Nottingham, UK, Nottinghamshire, England
    Posts
    190
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VB6 executable can execute Access macro? (Office 2000)

    I have an Access macro for a database that performs a SendObject for a report followed by an OutputTo for the same report (both in Snapshot format). That works ok, but what I'd really like to give the user (who doesn't have Access) is a small VB6 executable with a command button that reaches into the database, executes the macro (or at least replicates the action of the macro), so that she can have the report sent to her and also saved on the lan, without my having to be asked to do it for her.

    The query then is - is it possible to execute an Access report and both send it to a user and save it to disk (both in Snapshot format) from a VB6 executable? If so, how do I do it?

    Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VB6 executable can execute Access macro? (Office 2000)

    You can use Automation to control Access from VB6. This means that you create an object of type Access.Application and use this to execute Access VBA code. You can run macros this way, but it would be more efficient to uase VBA to send and output the report directly.
    See WendellB's tutorial Automation 101. It contains a short introduction and many useful links.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Nottingham, UK, Nottinghamshire, England
    Posts
    190
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB6 executable can execute Access macro? (Office 2000)

    Thanks Hans! Works a treat!

Posting Permissions

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