Public Function not running

A

azidrane

Hey,
I have a public function that I call from a cell. The function is:

Public Function QuitTime(strQuitTime As String) As Date
Dim strHour, strMin As String
Dim intHour, intMin As Integer
Dim dtTime As Date

strHour = Left(strQuitTime, 2)
strMin = Right(strQuitTime, 2)

dtTime = strHour & ":" & strMin
dtTime = dtTime + Range("MainSheet!B2") ' this cell contains the
value today()
QuitTime = dtTime

End Function

Anyway, I run a vlookup on this array from another sheet and when ever
i run that vlookup, it makes all the cells in the otherwookbook that
have this function in them evaluate to Value.

Any clue?
 
Top