ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Attaching a particular user defined function to cust button (https://www.excelbanter.com/excel-discussion-misc-queries/14405-attaching-particular-user-defined-function-cust-button.html)

Ajay

Attaching a particular user defined function to cust button
 
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

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)


"Ajay" wrote in message
...
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




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.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Ajay" wrote in message
...
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




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

"Earl Kiosterud" wrote:

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.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Ajay" wrote in message
...
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






All times are GMT +1. The time now is 03:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com