Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Cairns, Queensland, Australia
    Posts
    885
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run Excel macro at shutdown

    I know this is a long shot, but...

    A fellow techie wants to set up a group of Win98 PCs so that an Excel spreadsheet is updated with the time, and date, that the shutdown occurs. He has setup the startup to time stamp this sheet when Windows opens.

    The thought behind this is that it would act as an automatic timesheet generator for the users. (I can see the holes in his logic, but that's his problem.)
    Granville

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run Excel macro at shutdown

    It can be done, it just depends on how good your friend is at DOS...

    The trick, is to add the following line to your msdos.sys file:

    BootGUI=0

    This will require that you subsequently add the WIN command to your autoexec.bat.

    He can then call a batch file to record the system time after the user shuts down. There are a few things to consider however:

    I'm not sure how it effects ATX boards, which turn the system off automatically after shutdown, and I don't have any immediate sparks of enlightenment as to how one might take the DOS information and dump it into Excel.. but at least that's a start for ya...

    For more on DOS batch file programming, <A target="_blank" HREF=http://www.ericphelps.com/batch/>click here.</A>

    Hope that helps!
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run Excel macro at shutdown

    To get it to excel, have him write a batch file that will save the time as a comma-delimited text file, so that he can import it with a macro... <img src=/S/bingo.gif border=0 alt=bingo width=15 height=22>
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Cairns, Queensland, Australia
    Posts
    885
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run Excel macro at shutdown

    Thanks, Drk.

    Glen is an old f-f-f-f-fellow like me, and is probably more comfortable with a C:> prompt than a mouse.

    Will pass this on with the tip, again, that he join the Lounge.
    Granville

Posting Permissions

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