On Jul 29, 6:30*pm, OssieMac <Ossie...@discussions.microsoft.com>
wrote:
> Hello Ryder,
>
> If you are going to click a button then somewhere you have to type the
> argument. Where are you going to do this?
>
> If in a cell on a worksheet or control on a userform then you can pick up
> the cell's/control's value in the code.
>
> You can also pickup the ActiveCell value.
>
> Alternatively an inputbox at the start of the code.
>
> --
> Regards,
>
> OssieMac
>
>
>
> "Ryder S" wrote:
> > Hi all,
>
> > When I assign macros to my worksheet buttons, there are times that I
> > would like to pass on an argument along with that macro call. *Is
> > there a way to do this?
>
> > Thank you!
>
> > Ryder- Hide quoted text -
>
> - Show quoted text -
Well, not really... the argument would be provided by what calls it...
not the person.
In this particular case, I want different buttons on different
worksheets to be able to call the same function or sub, but I want the
function or sub to know something about what button was used to call
it.
So my thinking is this: when you "Assign Macro" to a button on a
worksheet, there may be a syntax one can take advantage of.
If this is not the case, then how can buttons be assigned to launch
macros that require an argument be supplied?
-RS-
|