Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Connumdrum #2

All,
I am trying to use a user defined function in the validation for a cell
range. The validation type is custom, and I have a function which is defined
as Boolean.

I get an error message saying that the referenced named range is invalid. I
am not using a named range!

Should user defined functions work in validation?

Thanks,
Alex J


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Connumdrum #2

=myFunction

is a user defined name

=myFunction()

is a function

Is that your problem?

--
Regards,
Tom Ogilvy

"Alex J" wrote in message
...
All,
I am trying to use a user defined function in the validation for a cell
range. The validation type is custom, and I have a function which is

defined
as Boolean.

I get an error message saying that the referenced named range is invalid.

I
am not using a named range!

Should user defined functions work in validation?

Thanks,
Alex J




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Connumdrum #2

Tom,



I am using:



Function ID_Frontlog(projno) As Boolean

ID_Frontlog = False

On Error GoTo XIT

If Right(projno, 2) = " F" Or _

Right(projno, 2) = " P" Or _

Right(projno, 2) = " E" Then

ID_Frontlog = True

End If



XIT:

End Function

This function works in code, and works when entered as a formula directly on
the sheet.

I am trying to set the custom validation Formula in the validation dialog
(not via VBA) as:

=ID_Frontlog(B9)

where B9 contains the text value "00OLE001 F". The error message is:

"A named range you specified cannot be found"



I know that it is easy enough to put the conditions directly into the
validation, however since the ID_Frontlog function is also used for other
verification in my VBA routines, the attraction is to only have to update
conditions in the function once, rather than going to the sheet.

Your advice would be greatly appreciated.

Alex


"Tom Ogilvy" wrote in message
...
=myFunction

is a user defined name

=myFunction()

is a function

Is that your problem?

--
Regards,
Tom Ogilvy

"Alex J" wrote in message
...
All,
I am trying to use a user defined function in the validation for a cell
range. The validation type is custom, and I have a function which is

defined
as Boolean.

I get an error message saying that the referenced named range is

invalid.
I
am not using a named range!

Should user defined functions work in validation?

Thanks,
Alex J






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Connumdrum #2

I can reproduce it, but I haven't figured out the cause.

--
Regards,
Tom Ogilvy

"Alex@JPCS" wrote in message
...
Tom,



I am using:



Function ID_Frontlog(projno) As Boolean

ID_Frontlog = False

On Error GoTo XIT

If Right(projno, 2) = " F" Or _

Right(projno, 2) = " P" Or _

Right(projno, 2) = " E" Then

ID_Frontlog = True

End If



XIT:

End Function

This function works in code, and works when entered as a formula directly

on
the sheet.

I am trying to set the custom validation Formula in the validation dialog
(not via VBA) as:

=ID_Frontlog(B9)

where B9 contains the text value "00OLE001 F". The error message is:

"A named range you specified cannot be found"



I know that it is easy enough to put the conditions directly into the
validation, however since the ID_Frontlog function is also used for other
verification in my VBA routines, the attraction is to only have to update
conditions in the function once, rather than going to the sheet.

Your advice would be greatly appreciated.

Alex


"Tom Ogilvy" wrote in message
...
=myFunction

is a user defined name

=myFunction()

is a function

Is that your problem?

--
Regards,
Tom Ogilvy

"Alex J" wrote in message
...
All,
I am trying to use a user defined function in the validation for a

cell
range. The validation type is custom, and I have a function which is

defined
as Boolean.

I get an error message saying that the referenced named range is

invalid.
I
am not using a named range!

Should user defined functions work in validation?

Thanks,
Alex J








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Connumdrum #2

OK, it isn't supported:

http://support.microsoft.com/default...23&Product=xlw
XL97: Cannot Use Custom Function with Data Validation

I suspect this hasn't changed in later versions.

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
I can reproduce it, but I haven't figured out the cause.

--
Regards,
Tom Ogilvy

"Alex@JPCS" wrote in message
...
Tom,



I am using:



Function ID_Frontlog(projno) As Boolean

ID_Frontlog = False

On Error GoTo XIT

If Right(projno, 2) = " F" Or _

Right(projno, 2) = " P" Or _

Right(projno, 2) = " E" Then

ID_Frontlog = True

End If



XIT:

End Function

This function works in code, and works when entered as a formula

directly
on
the sheet.

I am trying to set the custom validation Formula in the validation

dialog
(not via VBA) as:

=ID_Frontlog(B9)

where B9 contains the text value "00OLE001 F". The error message is:

"A named range you specified cannot be found"



I know that it is easy enough to put the conditions directly into the
validation, however since the ID_Frontlog function is also used for

other
verification in my VBA routines, the attraction is to only have to

update
conditions in the function once, rather than going to the sheet.

Your advice would be greatly appreciated.

Alex


"Tom Ogilvy" wrote in message
...
=myFunction

is a user defined name

=myFunction()

is a function

Is that your problem?

--
Regards,
Tom Ogilvy

"Alex J" wrote in message
...
All,
I am trying to use a user defined function in the validation for a

cell
range. The validation type is custom, and I have a function which is
defined
as Boolean.

I get an error message saying that the referenced named range is

invalid.
I
am not using a named range!

Should user defined functions work in validation?

Thanks,
Alex J












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Connumdrum #2

Thanks for digging that up, Tom. At least I know that I'm not doing some
dumb-ass thing (again)!

Tom, you are a really phenomenol performer on this NG. Your contributions
are always rock-solid, and very timely. I appreciate your help.

Alex J


"Tom Ogilvy" wrote in message
...
OK, it isn't supported:

http://support.microsoft.com/default...23&Product=xlw
XL97: Cannot Use Custom Function with Data Validation

I suspect this hasn't changed in later versions.

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
I can reproduce it, but I haven't figured out the cause.

--
Regards,
Tom Ogilvy

"Alex@JPCS" wrote in message
...
Tom,



I am using:



Function ID_Frontlog(projno) As Boolean

ID_Frontlog = False

On Error GoTo XIT

If Right(projno, 2) = " F" Or _

Right(projno, 2) = " P" Or _

Right(projno, 2) = " E" Then

ID_Frontlog = True

End If



XIT:

End Function

This function works in code, and works when entered as a formula

directly
on
the sheet.

I am trying to set the custom validation Formula in the validation

dialog
(not via VBA) as:

=ID_Frontlog(B9)

where B9 contains the text value "00OLE001 F". The error message is:

"A named range you specified cannot be found"



I know that it is easy enough to put the conditions directly into the
validation, however since the ID_Frontlog function is also used for

other
verification in my VBA routines, the attraction is to only have to

update
conditions in the function once, rather than going to the sheet.

Your advice would be greatly appreciated.

Alex


"Tom Ogilvy" wrote in message
...
=myFunction

is a user defined name

=myFunction()

is a function

Is that your problem?

--
Regards,
Tom Ogilvy

"Alex J" wrote in message
...
All,
I am trying to use a user defined function in the validation for a

cell
range. The validation type is custom, and I have a function which

is
defined
as Boolean.

I get an error message saying that the referenced named range is
invalid.
I
am not using a named range!

Should user defined functions work in validation?

Thanks,
Alex J












  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Connumdrum #2

One workaround would be to use a helper cell (maybe right next to the real cell
but in a hidden row/column). Put your udf formula there and have the
data|validation point at that cell.



Alex J wrote:

Thanks for digging that up, Tom. At least I know that I'm not doing some
dumb-ass thing (again)!

Tom, you are a really phenomenol performer on this NG. Your contributions
are always rock-solid, and very timely. I appreciate your help.

Alex J

"Tom Ogilvy" wrote in message
...
OK, it isn't supported:

http://support.microsoft.com/default...23&Product=xlw
XL97: Cannot Use Custom Function with Data Validation

I suspect this hasn't changed in later versions.

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
I can reproduce it, but I haven't figured out the cause.

--
Regards,
Tom Ogilvy

"Alex@JPCS" wrote in message
...
Tom,



I am using:



Function ID_Frontlog(projno) As Boolean

ID_Frontlog = False

On Error GoTo XIT

If Right(projno, 2) = " F" Or _

Right(projno, 2) = " P" Or _

Right(projno, 2) = " E" Then

ID_Frontlog = True

End If



XIT:

End Function

This function works in code, and works when entered as a formula

directly
on
the sheet.

I am trying to set the custom validation Formula in the validation

dialog
(not via VBA) as:

=ID_Frontlog(B9)

where B9 contains the text value "00OLE001 F". The error message is:

"A named range you specified cannot be found"



I know that it is easy enough to put the conditions directly into the
validation, however since the ID_Frontlog function is also used for

other
verification in my VBA routines, the attraction is to only have to

update
conditions in the function once, rather than going to the sheet.

Your advice would be greatly appreciated.

Alex


"Tom Ogilvy" wrote in message
...
=myFunction

is a user defined name

=myFunction()

is a function

Is that your problem?

--
Regards,
Tom Ogilvy

"Alex J" wrote in message
...
All,
I am trying to use a user defined function in the validation for a
cell
range. The validation type is custom, and I have a function which

is
defined
as Boolean.

I get an error message saying that the referenced named range is
invalid.
I
am not using a named range!

Should user defined functions work in validation?

Thanks,
Alex J











--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Connumdrum #2

And if I had click on the link to the kb article, I would have seen that it
describes this.

oops.



Dave Peterson wrote:

One workaround would be to use a helper cell (maybe right next to the real cell
but in a hidden row/column). Put your udf formula there and have the
data|validation point at that cell.

Alex J wrote:

Thanks for digging that up, Tom. At least I know that I'm not doing some
dumb-ass thing (again)!

Tom, you are a really phenomenol performer on this NG. Your contributions
are always rock-solid, and very timely. I appreciate your help.

Alex J

"Tom Ogilvy" wrote in message
...
OK, it isn't supported:

http://support.microsoft.com/default...23&Product=xlw
XL97: Cannot Use Custom Function with Data Validation

I suspect this hasn't changed in later versions.

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
I can reproduce it, but I haven't figured out the cause.

--
Regards,
Tom Ogilvy

"Alex@JPCS" wrote in message
...
Tom,



I am using:



Function ID_Frontlog(projno) As Boolean

ID_Frontlog = False

On Error GoTo XIT

If Right(projno, 2) = " F" Or _

Right(projno, 2) = " P" Or _

Right(projno, 2) = " E" Then

ID_Frontlog = True

End If



XIT:

End Function

This function works in code, and works when entered as a formula
directly
on
the sheet.

I am trying to set the custom validation Formula in the validation
dialog
(not via VBA) as:

=ID_Frontlog(B9)

where B9 contains the text value "00OLE001 F". The error message is:

"A named range you specified cannot be found"



I know that it is easy enough to put the conditions directly into the
validation, however since the ID_Frontlog function is also used for
other
verification in my VBA routines, the attraction is to only have to
update
conditions in the function once, rather than going to the sheet.

Your advice would be greatly appreciated.

Alex


"Tom Ogilvy" wrote in message
...
=myFunction

is a user defined name

=myFunction()

is a function

Is that your problem?

--
Regards,
Tom Ogilvy

"Alex J" wrote in message
...
All,
I am trying to use a user defined function in the validation for a
cell
range. The validation type is custom, and I have a function which

is
defined
as Boolean.

I get an error message saying that the referenced named range is
invalid.
I
am not using a named range!

Should user defined functions work in validation?

Thanks,
Alex J











--

Dave Peterson


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connumdrum #1 Alex J Excel Programming 4 December 18th 03 03:07 PM


All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"