J
Jay Flowers
I am very new to VBA and have only written small simple macros for
Excel.
I am trying to write a macro for an inventory sheet that allows a user
to choose a size for a t-shirt useing button clicks. For example:
A user has a choice of a red,green or blue t-shirt.
He clicks a button for the shirt of his choice and a form pops up
asking the user to choose a size. Clicking one of the size select
buttons causes the # in stock and the # sold for that size of the
t-shirt to change.
I can write macros that do this useing constants, but that would
require makeing a userform and codeing the buttons for each type of
t-shirt. I know that I should be able to make one form that can be
used by all the t-shirt button clicks useing variables but I can't
figure out how to pass the variables between the button click subs and
the userform.
What I need is to either choose the range of cells in the t-shirt
button click and the pass that to the Size userform or use the
control-button clicks on the user-form to assign a variable that can
be sent back to the t-shirt click,where they can be used to determine
the range of cells.
I've read VBA for Dummies but it did not help me with this
particular problem. I would appreciate any help I can get. Thanks
P.S. One more question. I use the Student/Teacher version of Office
and I cannot find a listing of Statements in the help section. Where
can I find the list at? Thanks again.
Excel.
I am trying to write a macro for an inventory sheet that allows a user
to choose a size for a t-shirt useing button clicks. For example:
A user has a choice of a red,green or blue t-shirt.
He clicks a button for the shirt of his choice and a form pops up
asking the user to choose a size. Clicking one of the size select
buttons causes the # in stock and the # sold for that size of the
t-shirt to change.
I can write macros that do this useing constants, but that would
require makeing a userform and codeing the buttons for each type of
t-shirt. I know that I should be able to make one form that can be
used by all the t-shirt button clicks useing variables but I can't
figure out how to pass the variables between the button click subs and
the userform.
What I need is to either choose the range of cells in the t-shirt
button click and the pass that to the Size userform or use the
control-button clicks on the user-form to assign a variable that can
be sent back to the t-shirt click,where they can be used to determine
the range of cells.
I've read VBA for Dummies but it did not help me with this
particular problem. I would appreciate any help I can get. Thanks
P.S. One more question. I use the Student/Teacher version of Office
and I cannot find a listing of Statements in the help section. Where
can I find the list at? Thanks again.