+ Reply to Thread
Results 1 to 3 of 3

Free-standing macros

  1. #1
    Pflugs
    Guest

    Free-standing macros

    Can a macro exist and run on its own outside of a spreadsheet? I wrote a
    program that I'd like to run from, say, my Desktop rather than opening a
    spreadsheet and clicking a button. Any ideas?

    Thanks, Matthew


  2. #2
    Tim Williams
    Guest

    Re: Free-standing macros

    Excel macros can only run in Excel. You might be able to convert your
    code to a VBscript routine: all depends on what it does....

    Tim.


    "Pflugs" <[email protected]> wrote in message
    news:[email protected]...
    > Can a macro exist and run on its own outside of a spreadsheet? I
    > wrote a
    > program that I'd like to run from, say, my Desktop rather than
    > opening a
    > spreadsheet and clicking a button. Any ideas?
    >
    > Thanks, Matthew
    >




  3. #3
    Bob Phillips
    Guest

    Re: Free-standing macros

    You should be able to do anything from VBScript, but it will require opening
    an instance of Excel. Once you have a reference to an Excel object, you will
    have the same options.

    Here is a very trivial example that should be saved as a .vbs file and then
    just launched

    Dim xlApp

    Set xlApp = CreateObject("Excel.Application")
    xlApp.Workbooks.Add
    MsgBox xlApp.ActiveWorkbook.Name
    xlApp.Quit
    Set xlApp = Nothing


    --
    HTH

    Bob Phillips

    "Pflugs" <[email protected]> wrote in message
    news:[email protected]...
    > Can a macro exist and run on its own outside of a spreadsheet? I wrote a
    > program that I'd like to run from, say, my Desktop rather than opening a
    > spreadsheet and clicking a button. Any ideas?
    >
    > Thanks, Matthew
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1