From: Gary''s Student on
You are very welcome.
Thanks for the feedback!
--
Gary''s Student - gsnu201003


"Subodh" wrote:

> On May 15, 5:11 pm, Gary''s Student
> <GarysStud...(a)discussions.microsoft.com> wrote:
> > An interesting request!
> >
> > This little macro enters the function in the active cell. It then uses
> > SendKeys to enter Edit Mode and move the cursor betweeen the parens:
> >
> > Sub FormulaStarter()
> > Dim r As Range
> > Set r = ActiveCell
> > r.Formula = "=mysub()"
> > Application.SendKeys "{F2}"
> > Application.SendKeys "{LEFT}"
> > DoEvents
> > End Sub
> >
> > --
> > Gary''s Student - gsnu201003
> >
> >
> >
> > "Subodh" wrote:
> > > I have a function named mysub and with parameters that has to be
> > > supplied to the function.
> > > I want that when the cell where the function is to be inserted, the
> > > user can type the arguments of the
> > > function sub after they have run the sub. Lets say, that after the sub
> > > is run, they get =mysub(..) with the
> > > cursor in between the parenthesis and so that they can move with
> > > typing of the arguments/parameter of the
> > > function.
> > > So, in summary, the advantage is that, the user should not type =mysub
> > > through the keyboard
> > > or they donot even need to remember that provied that there are large
> > > number of such functions.
> > > Thanks for your response.
> > > .- Hide quoted text -
> >
> > - Show quoted text -
>
> Thanks Gary's
> It worked as i had expected.
> Thanks a lot.
> .
>