Skip to main content
17-Peridot
August 24, 2012
Solved

WRITEEXCEL problem in IF statement

  • August 24, 2012
  • 1 reply
  • 1227 views

Hello folks,

I tried to write a routine that stores intermediate results only when I invoke it. For this purpose I'm using a list box that gives out a command variable (out) so that only the parts of the routine are executed that comply with this value. The subsequent routine has either to write or read to a given file data. All works fine and swell except that the first if condition is evaluated when I'm choosing the second one.

The file (MathCad 15 on a Win / 64 Bit machine) is added.

Can somebody spot the error?

Thanks in advance

Raiko

Best answer by AndyWesterman

Hi Raiko,

in case out=2 you can get to the WriteExcel ( Z... statement without defining Z & I think that this is what mathcad is complaining about.

regards

Andy

1 reply

12-Amethyst
August 24, 2012

Hi Raiko,

in case out=2 you can get to the WriteExcel ( Z... statement without defining Z & I think that this is what mathcad is complaining about.

regards

Andy

Raiko17-PeridotAuthor
17-Peridot
August 24, 2012

Hello Andy,

the Z..statement was indeed misplaced. That did the trick

Thanks

Raiko