nainil
asked on
Excel Hide button based on condition
I added a button on my excel sheet and assigned a macro to it.
Is it possible to hide the button based on value on a particular cell.. like H1? If H1 contains "pass", only then the button should appear.
This is NOT a COMMAND Button. A simple Form button.
Is it possible to hide the button based on value on a particular cell.. like H1? If H1 contains "pass", only then the button should appear.
This is NOT a COMMAND Button. A simple Form button.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@jppinto:
How is it supposed to work?
I tried adding the worksheet_change sub... saved the sheet, reopened the same.. the button existed whether or not the value exists in H1.
I opened the sheet you provided, and it works. But, not on my side.
@hitsdoshi1:
how / where do I need to add the code?
How is it supposed to work?
I tried adding the worksheet_change sub... saved the sheet, reopened the same.. the button existed whether or not the value exists in H1.
I opened the sheet you provided, and it works. But, not on my side.
@hitsdoshi1:
how / where do I need to add the code?
ASKER
Never mind, I figured it out :)
Thank you.
Thank you.
With all due respect, why did you accepted the solution from hitsdoshi1? If you use that code, you will get an error because it is missing the object sheet reference! The code is not completed and correct so you shouldn't accept that solution.
I would appreciate your comments on this please.
jppinto
I would appreciate your comments on this please.
jppinto
I would appreciate, for future reference, that you at least respond to my question!
ActiveSheet.SHAPES("Button
else
ActiveSheet.SHAPES("Button
Endif