LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Macro runs in Excel 2003, bombs in XP - Compatability question

Hello

Having an aggravating problem in a workbook. I didn't write it, it comes from a third party.

I download this workbook from the creator's site on my Excel XP (2000) machine, it runs fine. I make some changes and
save it. It works fine.

I download this workbook from the creator's site on my Excel 2003 machine, it runs fine. I make some changes and save
it. It works fine.

If I open the file saved with Excel XP on the 2003 machine, it runs fine.

If I open the file saved with Excel 2003 on the XP machine, it gives me an error as part of a VB script called module,
and I can't get it to run.

In other words, using the file from the XP machine, and doing work with that file on the 2003 machine, makes the file
impossible to move back to the Excel XP 2002 machine. The changes I made are minor, and not even a part of the VB code
that's showing up in the debugger with the error. The error code highlighted reads:

Compile error: Can't find project or library

When I press OK, it jumps to this part of the code:

Sub AddToListBox()
'this method is called when the workbook is first opened and when rows are added to the All
'Units worksheets. This method refreshes the Listbox on the Data worksheet with data from the
'All Units worksheet.
Dim iCounter As Integer
Dim sDataKey As String

Sheets("All Units").Select
Range("A1").Select
iCounter = 3


'find out how many rows in All Units worksheet contain data
Do Until (Trim(Range("$A" & iCounter).Value) & Trim(Range("$B" & iCounter).Value) & Trim(Range("$C" &
iCounter).Value) & Trim(Range("$D" & iCounter).Value) & Trim(Range("$E" & iCounter).Value)) = ""

The word Trim is highlighted in yellow, and it stops there. I've tested really carefully, moving the file I've saved
with Excel 2003 to 2 different machines with Excel 2002, and I get the same problem, yet no problem opening the same
file with Excel 2003.

Thank you



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA macro runs fine, but freezes if I try to do ANYTHING else whileit runs Rruffpaw Setting up and Configuration of Excel 1 September 17th 11 01:25 PM
Excel 2007 macro compatability Al @ Frontier Excel Discussion (Misc queries) 1 December 30th 09 10:32 PM
Excel 2007 compatability mode, can't open when saved by excel 2003 Graham.Euroglaze Excel Discussion (Misc queries) 0 September 18th 08 04:06 PM
Excel compatability 2003-2007 Vitordf Setting up and Configuration of Excel 3 September 26th 07 07:21 PM
Office 2000 Excel Macro runs very slow in 2003, why? The_Other_Mike Excel Discussion (Misc queries) 1 May 10th 06 04:36 PM


All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"