H
hdf
I have created a simple User Defined Function that I had hoped would
launch a specific macro depending on whether the value in a given cell
using the UDF was True or False.
It is not working, so I'm obviously doing something wrong.
When the value the UDF is linked to is FALSE, the UDF cell puts in the
value "0" (which is fine for my needs). But when the value is linked
to the formula is TRUE, the UDF cell gives back the #Value! error and
it does not call the macro I want it to call.
Can someone help explain what I'm doing wrong? Following is the UDF
code I used.
_________
Function LaunchMacro (InputValue As Boolean)
If InputValue = True Then
Application.Run "NamedMacro"
Else
Exit Function
End If
End Function
_________
launch a specific macro depending on whether the value in a given cell
using the UDF was True or False.
It is not working, so I'm obviously doing something wrong.
When the value the UDF is linked to is FALSE, the UDF cell puts in the
value "0" (which is fine for my needs). But when the value is linked
to the formula is TRUE, the UDF cell gives back the #Value! error and
it does not call the macro I want it to call.
Can someone help explain what I'm doing wrong? Following is the UDF
code I used.
_________
Function LaunchMacro (InputValue As Boolean)
If InputValue = True Then
Application.Run "NamedMacro"
Else
Exit Function
End If
End Function
_________