View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Subodh Subodh is offline
external usenet poster
 
Posts: 99
Default Insert a function through a command button

On May 12, 1:57*pm, "Bob Phillips" wrote:
I did something similar to this. The problem is that you can't have your
code inserting and the user interacting as Excel does natively, so what I
did was to throw up a dialog asking the user to select the cell to be
included, using Application.Inputbox(...Type:=8) and then get that cell
address and inject it into my string, and return the string from the
function.

--

HTH

Bob

"Subodh" wrote in message

...



I have custom function created in VBA.
I want to use the button to insert the function.
I tried to accomplish is something like inserting the Sum function by
clicking the button so that =sum() appears in the cell and i can type
the number/parameters required.
But, when i tried to do that using a macro recorder then it cannot be
done
Any help would be appreciated.
Thanks in advance.- Hide quoted text -


- Show quoted text -


I think in my case, application.inputbox is not needed.
Coz, the desired cell is already selected So, its very easy to get
that cell address.
So, I only need to get a way to inject the cell address to the string
to use the function, i hope
that it would be possible.
Thanks for your prompt response.