Attaching a particular user defined function to cust button

A

Ajay

Hello All
Quick question can I attach a user defined function from Personal workbook
to a customized button, I know I can right mouse click the button and assign
macro but the list does not include functions.
Probably doing something v wrong help would be much appreciated
TIA
Ajay
 
B

Bob Phillips

Ajay,

Why are you using a function? Functions return a result to the caller, so
even if you could assign it, no-one would see the answer. A button is better
served to run a routine (macro, sub) that does things, like colour cells,
etc.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
E

Earl Kiosterud

Ajay,

We may have a terminology problem here. If it's really a user-defined
function, it can be called only in a formula, not from a button. If the
macro is a sub (not a function), then it can be assigned to a button.
 
A

Ajay

No problem it was just a thought I have a lot of user defined functions listed
and I just wondered if I could get to one or more slightly quicker than
usual!!
I use one of Dave Petersons the multiple lookup function a lot which works
great
just thought I could put it on a toolbar/button.
Thanks for the replies
Ajay
 
Top