Thread: UDF
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default UDF

Perhaps its how you are calling it in the worksheet:

=duration(1,2)
=duration(A1,B1)

both work

In VBA:

Sub routine()
MsgBox (duration(1, 2))
End Sub

also works
--
Gary''s Student - gsnu200733


"Arne Hegefors" wrote:

Hi! I am trying to write a simple udf that takes three parameters as
argument. never mind what the udf is supposed to do, i just cant get it to
work for more than one argument. pls help me!

Function duration(n, t)
duration = n + t
End Function

This works for one argument (i then skip the t in the duartion line). pls
help!