View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andibevan Andibevan is offline
external usenet poster
 
Posts: 28
Default UDF Works in Debug Window but not on Sheet?

I have the following UDF which works when I call it from the debug window
but not on a sheet.

Any ideas?

Public Function GetRole(sRole As String) As Long

Debug.Print "GetRole = " & GetRole

GetRole = Sheets("Settings").Range("stng_Users").Find(sRole) .Row

Debug.Print "GetRole = " & GetRole

End Function