• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Expanding on Chandoo's Holiday Sale Trick

naquin316

New Member
I really like the holiday the holiday sale trick from last month. http://chandoo.org/wp/2013/12/05/on-off-switch-in-excel-vba/

I have been looking for something like this to use in a project i've been working on. For some reason I couldn't get the button to slide when I copied code and shapes to my own sheet. I ended up making ActiveX buttons and getting the orginal code to work.. I know.. Defeats the whole cool factor.

My question I have it working now where I have a transparant box covering some data, then I click the activeX button once and then a red semi-transparent box covers the data. I need help adding a 3rd box,green.

Here is a link to the file if anyone wants to look at it: https://db.tt/bzYHlPs0

I appreciate any help!

Note:
Only the bottom 2 buttons are programed.
 
Hi ,

I have taken a look at your sheet ; I am not able to take a look at your problem.

When I click on the button FireGun1 , the red shape Gun1On becomes visible ; a second click makes it invisible.

Similarly , when I click on the button FirePlug , the red shape PlugOn becomes visible ; a second click makes it invisible.

What do you want to do next ?

Referring to Chandoo's blog post is not required , because members who wish to answer your question may be able to do so without going through what Chandoo has posted ; if you can just describe what you wish to do , you may get an answer faster.

Narayan
 
I would like a 3rd click to be able to make the shapes green. Also I would like to have a separate button that would return everything back to normal. Can you help with this?
 
Hi ,

Is this the sequence you are looking for ?

1. First click on the button FireGun1 , the red shape Gun1On becomes visible.

2. Second click on the button FireGun1 , the shape Gun1On turns Green.

3. Third click on the button FireGun1 , the shape Gun1On becomes invisible.

Narayan
 
Hi ,

Which means this ?

1. First click on the button FireGun1 , the Green shape Gun1On becomes visible.

2. Second click on the button FireGun1 , the shape Gun1On turns Red.

3. Third click on the button FireGun1 , the shape Gun1On becomes invisible.

Narayan
 
Thank you! It works great. Now if both were colored and I wanted to have both go back to clear with one click how would I do that with a "Reset All" button?
 
Narayan,

Sorry to trouble you, but I have changed the shapes. I've made the shapes to where they accent the boxes instead of fill them. I've named them "plugfire" for green box, and "plugmissfire" for red box. Then i've added the shapes for all 9 guns with the following name "gun1fire,gun2fire,etc.." for the green box, and "gun1missfire,gun2missfire,etc.." for the red box. I've also assigned all of the buttons names and added a clear buton to turn all red and green boxes off. I played around a little with your code but could not get things to work.

Here is what I would like the worksheet to do:
-When I click on the "FirePlug" button I would like for the green shape "plugfire" to accent the c63 and c65 cells. On the 2nd click I would like the red shape "plugmissfire" to accent the same cells and for the green shape to turn off. A 3rd click would turn both shapes off.

If you can help me with this 1st one I can figure out guns 1-9.
Also if you could help me with code for the clear button. When clicking the clear button I would like to turn off all shapes (plugfire,plugmissfire,gun1fire,gun2fire,etc...gun1missfire,gun2missfire,etc...)

I've reuploaded the file I have been working on.
 

Attachments

  • PLUGPERFSHEET.xlsm
    240.7 KB · Views: 4
Hi ,

Can you check your file now ? I have put in the code only for the Fireplug button , and the Clear button.

Narayan
 

Attachments

  • PLUGPERFSHEET_Latest.xlsm
    242.5 KB · Views: 3
Back
Top