UDF

J

Jack Sons

Hi all,

Once I found in the NG this function to inverse text in a cell.

Function Reversetext(a As String) As String
Reversetext = StrReverse(a)
End Function

I put it in my Personal.xls but can't figure out how to make make it work.

Jack Sons
The Netherlands
 
B

Bob Phillips

=Personal.xls!ReverseText(A1)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
J

Jack Sons

Bob,

Thanks, I got it.
Is it possible to get rid of the Personal.xls! part?
I mean that I can use it just like any other function, in this way:
= ReverseText(A1)

Jack.
 
B

Bob Phillips

Hi Jack,

You would need to put it in an addin to so that, and in stall the addin.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
D

Dave Peterson

I've saved my personal.xl* file as an addin in my XLStart folder. And I get the
behavior you describe. But the macros that you may have run via Tools|Macro are
no longer visible.

I like John Walkenbach's shell at:
http://j-walk.com/ss/excel/tips/tip53.htm

to provide access to those macros.
 
J

Jack Sons

Bob,
You would need to put it in an addin to do that, and install the addin.
How do I do that? Just save it with the extension xla in the XLStart
directory (or perhaps somewhere else)? Can xla's make Excel slow?


Dave,
But the macros that you may have run via Tools|Macro are
no longer visible.
Is that a problem? I thought they will appear as "normal" functions in the
functions paste box, isn't that even better?

Jack.
 
D

Dave Peterson

addins are just regular workbooks with a flag set (.isaddin = true).

So if that personal.xls made excel slow, so will .xla--but no slower.

If you want to install the addin, move it out of your xlstart folder and then
point at it via Tools|Addins. (And get rid of the personal.xls in xlstart,
too--you don't want duplicate stuff.)

(I'd just saveAs (as an addin) to xlstart and toss the .xls file.)

The functions will behave nicer--like you want. But if you have sub's that used
to get run via Tools|macro, they won't show up there any longer.

====
Another option if you have some Sub's and some Functions: Create two
workbooks--one called MyMacs.xls and one called myFunctions.xla and put them
both in your XLStart folder. (Get rid of the personal.* stuff, though.)

But I really like John Walkenbach's technique for building a menu system for
Subs.)
 
Top