+ Reply to Thread
Results 1 to 8 of 8

Run time 9 error

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    26

    Run time 9 error

    Hi all,
    I have been wrangling with this problem for a few months now. I have a spreadsheet that contains a couple of macros. Each of these macros i recorded in macro wizard, and essentially they go to another spreadsheet (already opened and in the same instance of excel (file>open)) grab a sheet of data and paste it back into the source. Now the problem is that they work brilliantly on my pc, but not on anyone elses.
    I will attach the code below, But some things i have checked are:

    1) the second file is opened in the same instance of excel using file>Open
    2) we are using the same version of excel (2007)

    One other possibly noteworthy point is that the files are on different network locations (i am sometimes opening them from USB, sometimes via VPN, with no issue, the others are directly on the network)

    Would really appreciate any help on this, i thought i had it licked once or twice but unfortunatly it keeps coming back to haunt me, the downside being i have to do the work every month when the process is run!
    Thanks again,
    dave
    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    09-24-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Run time 9 error

    PS maybe i should have mentioned that everyone else sees a Runtime 9 error!

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Run time 9 error

    Have you tried referring to the workbooks without the file extension?
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    09-24-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Run time 9 error

    Thanks Norie, No i havent tried that, but i will do so now! cheers

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Run time 9 error

    Forgot to ask, are you opening the file you are copying from in the code?

  6. #6
    Registered User
    Join Date
    09-24-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Run time 9 error

    No the file is already opened, in the same instance using file>open in excel
    cheers,
    Dave

  7. #7
    Registered User
    Join Date
    09-24-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Run time 9 error

    Hi Norie & all,
    I tried to remove the .XLS extensions but no luck, i note in the debugger that its falling over on the following line
    Please Login or Register  to view this content.
    I have tried replacting 'workbooks' with 'Windows', again no joy...
    thanks for your help guys!
    dave

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645
    Dave

    Which workbook is the code in?

+ 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