+ Reply to Thread
Results 1 to 3 of 3

Working code on my machine is returning out of range error on another machine.

  1. #1
    Registered User
    Join Date
    01-16-2012
    Location
    Christchurch, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    1

    Working code on my machine is returning out of range error on another machine.

    Hello all,

    I have written a piece of code which opens a number of txt files and extracts information from them.

    My code works like a treat on my machine but when a number of my collegues use it, it returns a subscript out of range error (Error 9) when attempting to assign a string (found in a cell) to a defined variable. The peculiar thing is that all the machines are running Excel (2007) off a Citrix server.

    Below is the line of code which shows the error:
    Please Login or Register  to view this content.
    I am writing code with option explicit on, so all variables are defined.

    I have also tried referencing the cell absolutely (ommiting .Range("A2") and changing it to .Cells(TxtCycle +1, 1) ) but it still returns the same error.

    The only differences I've found between computers is:
    My machine - Windows 7 64bit
    Collegues machine(s) - Windows XP 64 bit (error), Windows 7 64 bit (error) and Windows XP 32 bit (worked).
    But since Excel is being run off citrix I don't see how the machine opp system could effect the way the code runs.

    Thanks

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Working code on my machine is returning out of range error on another machine.

    Where is the workbook "TXT File Checker-Ver1" stored?
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Working code on my machine is returning out of range error on another machine.

    Hi and welcome to the forum,

    Is the citrix drive map the same on your computer as theirs? Does your machine have a default place to look for files that your collegues don't?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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