View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default Calculating the difference between hours

HoursWorked is not an Excel function so i guess it comes from an addin or you
wrote it yourself.
1. In the vba editor, do a compile (menu Debug Compile). Once no error is
returned, test the function:
2. You could run it from a Sub to test it:
Sub Test()
dim v
v= HoursWorked(Range(A1),Range(A2),Range(K1:K10))
debug.Print TypeName(v), v
End Sub
Change values in these ranges and run test again.

Regards,
Sebastien

"Sambusa" wrote:


Hi,
I have add "HoursWorked(A1,A2,K1:K10)" to cell where i want the result
to be "after i change the reference" but it's gave me this error ( Sub
or Function not defined )





Thanks
SAMI


--
Sambusa
------------------------------------------------------------------------
Sambusa's Profile: http://www.excelforum.com/member.php...o&userid=14960
View this thread: http://www.excelforum.com/showthread...hreadid=265883