View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis[_3_] Dana DeLouis[_3_] is offline
external usenet poster
 
Posts: 690
Default Application.WorksheetFunction problem

... debug statements that the developers apparently
forgot to turn off before shipping. You only see them in the immediate
window. They would not affect you code.


For those not familiar with how bad this Bug is, here is a small demo. I
run a few applications that use Fourier Analysis along with a worksheet with
many Engineering functions. Performance is so bad, that it's best to use
your own Fourier function and by-pass the ATP functions. I've tried and
tried to pass it on to Microsoft, but they don't seem to see it as a
problem. Ahhh!

Open the vba editor, and have the immediate window available to watch.
This is fast, and is not an issue. Nothing is written to the immediate
window:

Sub VeryFast()
[A:B].Clear
[A:A] = 3
[B:B].FormulaR1C1 = "=MOD(RC[-1],2)=0"
End Sub

This is Terrible, and is a major problem.

Sub VeryBad()
[A:B].Clear
[A:A] = 3
[B:B].FormulaR1C1 = "=IsEven(RC[-1])"
End Sub

--
Dana DeLouis
Win XP & Office 2003


"Tom Ogilvy" wrote in message
...
Sorry, I assumed this was a worksheet function since you were using that
qualifier. Based on what Dana has said, I look and see that is is
provided
by the Analysis toolpak. If you have the analysis toolpak VBA installed
you
can then do

b = Application.run ("ATPVBAEN.XLA!IsEven", Range("A1"))

to demo from the immediate window:

Range("A1").Value = 4
? Application.run("ATPVBAEN.xla!IsEven",Range("A1"))
[GetMacroRegId] 'ISEVEN' <
[GetMacroRegId] 'ISEVEN' - '752746504'
True
Range("A1").Value = 3
? Application.run("ATPVBAEN.xla!IsEven",Range("A1"))
[GetMacroRegId] 'ISEVEN' <
[GetMacroRegId] 'ISEVEN' - '752746504'
False

the lines with the [] are debug statements that the developers apparently
forgot to turn off before shipping. You only see them in the immediate
window. They would not affect you code. You do see it correctly returns
true or false based on the value of Range("A1")

Using xl2003

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
Dim b as Boolean
b = Application.WorksheetFunction.ISEVEN(Range("A1"))


--
Regards,
Tom Ogilvy

"Gary''s Student" wrote in

message
...
I am trying to call ISEVEN() from VBA with:

Dim b as Boolean
b = Application.WorksheetFunction.ISEVEN(A1)

I am raising "Object doesn't support this Property or Method"

What is the correct syntax?
--
Gary''s Student