Automatic calculation doesnt work anymore with Excel 2002

  • Thread starter Thread starter =?iso-8859-1?Q?Ga=E9tan?=
  • Start date Start date
?

=?iso-8859-1?Q?Ga=E9tan?=

I created the text file (test.txt). It contains the
following:
1;2;=SOMME(A1:B1)

I created an Excel macro used to load that file. Here is
the macro:
Workbooks.OpenText Filename:="c:\test.txt", Origin _
:=xlMSDOS, StartRow:=1, DataType:=xlDelimited,
TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False,
Semicolon:=True, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array
(Array(1, 1), _
Array(2, 1), Array(3, 1)), TrailingMinusNumbers:=True


When I use it with Excel 97, everything works fine
automatically.
Column A1 contains 1, column B1 contains 2 and column C1
contains 3

when I use it with Excel 2002, there is a problem with
colum C1:
Column A1 contains 1, column B1 contains 2 and column C1
contains #NAME?

What should I do to make C1 calculated automatically as
Excel 97 did ??

No action from user are autorized cause this problem apply
to a big report and that report have to be calculated
automatically without user action.

Note : I use French version of Excel but problem is
probably the same in english release

thank you !!
 
First, I use the USA version of excel2002.

And once I changed the =somme() to =sum(), your macro worked fine for me.

I don't know much about international issues in excel, but it sure sounds like
xl2002 isn't seeing =somme() as a valid function.

If you import your text file (and see the #Name? error), can you hit F2 on one
of those and enter.

Either it'll have no affect or it'll fix the problem.

If it fixed it, then maybe just add one more line to your macro:

Cells.Replace What:="=", Replacement:="=", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False

(Just replace all the equal signs with equal signs. It won't hurt anything if
everything was ok. And if it fixes the problem, whoohoo!)

If it had no affect, I'd check to see if that xl2002 pc is actually running the
French version of excel.

or if that's the only function that you use, you could convert the =somme() to
English's =sum().

Cells.Replace What:="=somme", Replacement:="=sum", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False

===
But I do believe that the macro you use in xl97 is not the one you posted:
This "TrailingMinusNumbers:=True" doesn't exist in xl97.

So after all this, maybe it's something in your macro?????
 
Back
Top