Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2006

Tip: Looking for answers? Try searching our database.

UDF argument type constraint

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Art - 20 Jun 2006 13:10 GMT
Hi all,

I have been forwarded the following UDF function as it is entered in a
cell

=woff(df3)

The argument "df3"  is a text string used in a select case statement in
the UDF , not an address reference.

The user does not want to place quotes around the argument every time
he works on it.

Does anyone know how I can modify the UDF to allow for this

This is the header line of the UDF:

Public Function woff(cpMeasure) As Double

Regards

ArtWork
Arvi Laanemets - 20 Jun 2006 13:23 GMT
Hi

Are you sure you really want this? At moment, the user can use any string
expression as argument - then this is no option anymore. P.e. now you can
enter into some cell (let's it be X1) your value (X1="df3"), and then refer
to this cell in your UDF <=WOFF(X1)>. With change you want this won't work
anymore, because any entry is treated as string.

Arvi Laanemets

> Hi all,
>
[quoted text clipped - 18 lines]
>
> ArtWork
Art - 20 Jun 2006 13:39 GMT
Avri,

Yes I am aware of this but the user feels strongly that he wants the
argument entered directly in the cell

Art

> Hi
>
[quoted text clipped - 28 lines]
> >
> > ArtWork
Bob Phillips - 20 Jun 2006 15:31 GMT
Can't do it, unless the string is a valid cell address. So DF3 could be made
to work, JA2 couldn't. The only proper way to pass a string value is as a
string, or as a range value.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

> Avri,
>
[quoted text clipped - 35 lines]
> > >
> > > ArtWork
Art - 20 Jun 2006 15:59 GMT
Thanks guys,

I have delivered the bad news to the user

Regards

Art

> Can't do it, unless the string is a valid cell address. So DF3 could be made
> to work, JA2 couldn't. The only proper way to pass a string value is as a
[quoted text clipped - 52 lines]
> > > >
> > > > ArtWork
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.