Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Make a macro standalone (2000)

    Hey all, I was wondering if you could make an excel macro run on its own, i.e., it would open Excel by itself and run it in the background. I want to make a small application with Excel as its engine but I want it to be transparent to users.

    If not, are there any suggestions? My application needs to generate Excel and Word documents based on user input.

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Make a macro standalone (2000)

    Unless your users are already working in Word or some other OLE-enabled app, where you can use a Word macro to fire up Excel, I think you'll need something like VB script for this - in simple terms, Excel macros won't run without Excel running, so you need something to tell Excel to start running an load your spreadsheet.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Make a macro standalone (2000)

    The short answer is no, there is no way to have a macro execute automatically if Excel is not running. The way to do this would be to make the macro an event macro (probably the open event) in a workbook. Then use the Windows scheduler to schedule the workbook to run when you want it to run.
    Legare Coleman

  4. #4
    Star Lounger
    Join Date
    Jun 2002
    Posts
    98
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Make a macro standalone (2000)

    Create an Excel template (*.XLT) with macros and a desktop shortcut pointing to it. User's click the shortcut and a copy of the template opens in Excel. Off you go... Not exactly transparent, but I don't understand what event "starts" your application.

    If you write a VB app you can use Excel application objects without displaying them to the user.
    __________________________________________________ ____
    <img src=/S/nun.gif border=0 alt=nun width=20 height=20> Sister Dory
    Our Lady of Perpetual Help, Holstein Falls, Wisconsin, USA

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Make a macro standalone (2000)

    But that is not automatic like the original question asked, the user has to double click on the shortcut. If you did do this, it should also probably also be a .xls file, not a template. This is not what templates are for.

    As I said in my post, the way to make it automatic is to use the Windows scheduler to schedule the .xls file to run on whatever schedule is required.
    Legare Coleman

  6. #6
    Star Lounger
    Join Date
    Jun 2002
    Posts
    98
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Make a macro standalone (2000)

    Sorry, if I misunderstood the question. It did mention "user input" -- something that normally requires the user to be present and accounted for at the computer when it runs. Maybe its just supposed to fly up onto the screen once and hour and ask them something. <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

    Sometimes people ask for a specific technical solution without explaining what their real goals are and I take them too literally and provide misleading info. "Automatically" running a program sure sounds like unattended running -- but maybe what the poster really means is "don't make my user open Excel and then open a file and then click a macro button". I don't know. Maybe we'll find out....Kevin?
    __________________________________________________ ____
    <img src=/S/nun.gif border=0 alt=nun width=20 height=20> Sister Dory
    Our Lady of Perpetual Help, Holstein Falls, Wisconsin, USA

Posting Permissions

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