Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF Works in Debug Window but not on Sheet?
Find doesn't work in a UDF in Excel 2000 or earlier. It would work in debug
because that is not a UDF, it is VBA. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Andibevan" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF Works in Debug Window but not on Sheet?
Thanks Bob - would never have thought of that.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
customizing debug pop up window | Excel Discussion (Misc queries) | |||
Works fine in debug, but... | Excel Programming | |||
Macro Works but not in Debug Step mode | Excel Programming | |||
Excel 2000 Code works except in debug mode | Excel Programming | |||
Macro sends Excel file by Outlook - works in debug - not realt | Excel Programming |