Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Feb 2004
    Location
    Boulder, Colorado, USA
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copy/paste values from other source computer (Excel 2k)

    I wish to copy/paste values to my workbook spreadsheet from another source computer on same network that is also collecting live data from another source. However, I want to copy data to my workbook at: specfic times throughtout a 24 hour period. I have no difficulty making connections. Any help would be greatly appreciated.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Copy/paste values from other source computer (Excel 2k)

    You could use
    <pre>Application.OnTime TimeValue("16:00:00"), "myProcedure"</pre>


    Where MyProcedure is the macro that will do the copy/paste and the time you want is 4:00 PM. YOu could add this code to the workbook open event of a workbook that you run each day.

    BUT it means you must keep excel open and running all day (at least until the time is past) and that you must start it up each day to get it. You could have myProcedure (when finished) do another ontime to continue the loop constantly if you just want to keep this instance of excel running 24/7.

    If you don't want to have excel open and running all thru the day every day, you would have to look into a scheduler type program, not excel. The scheduler you would want to open the excel file with the program and in the workbook open event of the excel file, you would have your code to do the copy/paste and then exit excel.

    Any timing things done with excel require it to be running (as would any scehduler).
    Steve

  3. #3
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy/paste values from other source computer (Excel 2k)

    For a scheduler, you can use the one built into Windows. You'd set a time for it to launch the Excel file which has the call to the code you want (it runs at 4pm as sdckapr showed you). You'll find it in Start/Program Files/ Administrative Tools/Services. This is a list of current services. The table is like this:

    <pre>Name | Description | Status | Startup Type | Log On As</pre>

    Where 'status' can be blank, started or stopped
    and 'startup type' is manual, automatic, disabled

    If you right-click the name field of any of these services you'll get a menu that lets you stop, pause, resume, restart that service.

    How do you get a service into this list? I spent about 10 min trying to find where to do this but didn't stumble on it. It's been quite a while since I've done this myself so maybe another lounge can take it from here.... <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>

    Deb

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy/paste values from other source computer (

    I'd be inclined to try the Scheduled Tasks applet in Control Panel. HTH
    Gre

  5. #5
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy/paste values from other source computer (

    Ahh, Yes that's it. <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23> I couldn't remember where it was. So the real answer to how to get the Excel code to run as needed (w/o leaving Excel running 24/7) is to use a 'scheduled task' not create a 'service' (need to write some code to do that) <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> for defogging the brain.

    Deb

Posting Permissions

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