Program a macro to run at specific instances
Thanks for the help on the first question, was just what I needed which you
both suggested. Unfortunately, the problem with pasting the macro in the
Worksheet Change area, it keeps running the macro everytime I click on a cell
which is a bit too much - I want it to only run when there is a change in
data in the B column (I have a specific range the macro looks at) which is
what tells the macro whether or not to hide a row. (Let me know if I need
to explain some more)
"AD108" wrote:
Try copying the macro into the "this workbook" code sheet. Select the
"Workbook" option in the upper Left drop down box, and select "open" from
the upper right drop down box. Then stick you code in between the
statements that are generated. This is an event procedure that take place
whenever something happens, in this case the wkbook opens.
For the second part, very similar. Activate the code sheet for the specific
sheet. Select the "Worksheet" option in the upper Left drop down box, and
select "change" from the upper right drop down box. Then stick you code in
between the statements that are generated
Let me know if this works for you.
"Chiku" wrote in message
...
I have a macro that hides blank rows whenever there is no value in a
particular cell. Two things:
1.) How do I program the macro to run everytime the file is opened
2.) How do I also program the macro to run every time someone adds a value
in any of the cells that determine whether its row should be hidden? In
other
words, column B contains the cells in which when blank, the row is hidden.
Now I want to unhide the row if someone enters data in the cell in column
B
(Let me know if I need to explain some more)
|