+ Reply to Thread
Results 1 to 9 of 9

Win XP64 bit vs Win 7 64 bit both Office 2007

  1. #1
    Registered User
    Join Date
    08-12-2004
    Posts
    45

    Win XP64 bit vs Win 7 64 bit both Office 2007

    Hi

    I have a work PC with XP 64 bit and a laptop with Win 7 64 bit both running Office 2007.

    The below code works perfectly on the Win 7 machine, however on the XP machine while the code runs to completion most of the time sometimes it fails with varying error messages.

    I found the reason for the failures to be part way through the code is an Excel routine, which ask Excel to Save, Close then Quit. On the XP machine when I open task manager, I have dozens on Excel instances open. Further if I run the code with task manager open and kill them one by one the code always run through to the end.

    I have tried adding taskkill into the code but due to the speed of the process it kills both the running task and the new one that is starting.

    Am I missing any patches/add-ins (anything) that will avoid upgrade to Win 7. Is their a smarter way of resolving this?

    Thanks in advance

    Rob


    Please Login or Register  to view this content.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,976

    Re: Win XP64 bit vs Win 7 64 bit both Office 2007

    Do you have a reference set to Excel? I would guess not since you are using CreateObject (though you might). If you don't then you can't use Excel constants - they will all just have a value of 0.
    I don't think that's actually your issue though - you might try using:
    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    08-12-2004
    Posts
    45

    Re: Win XP64 bit vs Win 7 64 bit both Office 2007

    Hey romperstomper,

    I do have a reference set to Excel - just tried your code unfortunately no change still numerous instances of Excel.

    Thanks for taking a look and if you have any more thoughts they are appreciated.

    Rob

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,976

    Re: Win XP64 bit vs Win 7 64 bit both Office 2007

    Try making the app visible in your code and see if there are any dialogs left open as you step through and try to quit.

  5. #5
    Registered User
    Join Date
    08-12-2004
    Posts
    45

    Re: Win XP64 bit vs Win 7 64 bit both Office 2007

    To the ***** eye its closing the app.

    No dialogues, file opens changes are made file saves, file closes and Excel closes... Excel opens and loops again through changes,save then close and quit. - Task Manager though says different.....

    Rather infuriating.

    I had it running on the laptop sat next to it - exactly same except Task Manager was not filling with Excel instances.

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,976

    Re: Win XP64 bit vs Win 7 64 bit both Office 2007

    Are you watching the Task manager to see at what point the excel instance is created?
    Incidentally, it would be a lot more efficient to start Excel once outside your loop, process all the files you need to inside the loop, then close Excel at the end.

  7. #7
    Registered User
    Join Date
    08-12-2004
    Posts
    45

    Re: Win XP64 bit vs Win 7 64 bit both Office 2007

    Taking out the quit part does not work either - which I assume is what you were aiming at for the efficiency as when we get back to

    Please Login or Register  to view this content.
    it opens up another version anyway.

    Maybe I am over simplifying this but if the same code works perfectly on another machine albeit different operating system and further to complete the loop I have now tested this on a 32 bit version of XP and again works fine.
    • Win 7 64 bit Perfect
    • XP 32 bit Perfect
    • XP 64 bit problems as outlined.

    I spent some time googling and could not find anything other than using a TASKKILL command and then pausing for 20 seconds until clear given on a bad month we would have 400 files which adds hours on to the process.

    Thanks for looking

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,976

    Re: Win XP64 bit vs Win 7 64 bit both Office 2007

    No, I was suggesting moving the CreateObject part too - more like this:
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-12-2004
    Posts
    45

    Re: Win XP64 bit vs Win 7 64 bit both Office 2007

    Still creating multiples .... copy and paste

    I gave in about half an hour and IT are going to put Win 7 on my PC as a last resort.

    XP 64 bit is not the most use friendly with all its driver issues so hopefully kill two birds with one stone. That said if a few lines of code or reinstall would have fixed it great.

    Thanks for your time

+ 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