Results 1 to 5 of 5

Migrating to Windows 7 - Open file for output unreliable

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    423

    Migrating to Windows 7 - Open file for output unreliable

    Hi Froum

    Hope someone here can help me out on this one! We are currently migrating our machines from XP/Office2003 to Win7/Office 2010. A problem I am having very frequently is this line of code is not working reliably any more:

    Open <path\filename> For Output as #FNum
    The variables are declared and valid, the path and filename are valid. If the path is on a WinXP machine, the code will work 100% of the time. If the path is on a Win7 machine (even if the code itself is being run on XP) then it is very unrealiable, and often (but not always) gives a run-time error Bad Name or File Number. In debug mode, if I simply change the path to an XP machine it will work, confirming the file name and number are both valid.

    As a workaround, in one spreadsheet I have set up a loop that keeps trying until eventually it opens. I keep count of how many times it tries - here are some sample values: 35,706 tries, 107,599 tries, 65,489 tries, 158,725 tries.

    My only guess it that there is some kind of permissions issue, but then if that were the case I would expect it to never work. In any case, I have admin rights, and the problem also occurs when logged in as administrator.

    Any thoughts?
    Last edited by mgs73; 09-17-2014 at 08:37 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 05-24-2013, 01:35 PM
  2. Replies: 1
    Last Post: 08-05-2006, 04:59 PM
  3. Open CSV file, format data and write output to a text file.
    By BristolBloos in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2005, 11:05 AM
  4. Replies: 0
    Last Post: 10-02-2005, 03:05 PM
  5. Open File or Switch Between Windows if File is Open
    By Ricky Pang in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-08-2005, 01:05 AM

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