+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 macro works differently on different systems.

  1. #1
    Registered User
    Join Date
    12-08-2011
    Location
    Dayton, OH
    MS-Off Ver
    Excel 2007
    Posts
    2

    Excel 2007 macro works differently on different systems.

    I have an Excel 2007 workbook with a macro that takes the data from one worksheet and makes a seperate TXT file. It works fine on two on my computers. On the third, the macro runs and gives no indication of an error, but not all of the data is transfered to the TXT file. All the systems have Excel 2007, all updates with the same SP , updates, ect..
    Any help is appreciated.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,485

    Re: Excel 2007 macro works differently on different systems.

    Does it matter how much data? How many records?

    If it can be repeated with a relatively small number of records, I'd step through the code on each machine and monitor the variables and output.

    You could post a sample workbook and someone could see what output they get.


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-08-2011
    Location
    Dayton, OH
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Excel 2007 macro works differently on different systems.

    I stepped through and at each step everything was correct, but the txt file still was wrong. Here is the excel file itself, a good txt and bad txt file. The difference in the two is the column with the "E" 's in it. The excel sheet is set to output the txt file to c:\test If you create a test folder at c:\ , you shouldn't need to make any other changes for it to work..

    Thx

    Marty
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,485

    Re: Excel 2007 macro works differently on different systems.

    On my laptop, I end up with a file which is identical to the "good" output.

    I guess the answer is to step through the code on the bad machine and watch as each cell is filled in. Clearly something is different on the "other" machine.

    Unfortunately, using single alpha character variable names isn't overly conducive to diagnosis, but there doesn't appear to be any calculation.

    Confusing

    Regards, TMS

+ 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