Checkbox and button snag
This is not hard, but unfortunately DOES require VBA
code. But hopefully I can give clear instructions. First, I hope you used the Forms toolbar instead of the Controls Toolbox to create the button and checkbox, just because the instructions would be a bit different, and they are easier if you use the Forms controls: 1) Right-click on your button. In the name box (that is up on the left of the formula bar - the box that shows you the name of the cell(s) or named range you have selected) you will see the name Excel has given to your button - probably "Button 1" or something like that. Write it down - you will need it. Also make note of the worksheet name and the cell address that your checkbox is linked to. 2) Right-click on your checkbox. Choose "Assign Macro..." 3) A list will appear with a selection shown up on top as "Macro Name:" - probably something like "Checkbox1_Click". Leave that as it is and press "New..." 2) You will be in the VBA editor and you should see something like this: Sub Checkbox1_Click() End Sub 3) In between the Sub Checkbox1_Click() line and the End Sub line, type this (I am including the Sub and End Sub lines) - except where I have Button1 make sure you are using the name of your button, your worksheet, and the linked cell for your checkbox. Here I will use "Button 1," "Sheet1," and "D4": Sub CheckBox1_Click() Sheets("Sheet1").Shapes("Button 1").Visible = Sheets ("Sheet1").Range("D4") End Sub 4) Exit out of the VBA editor and back to Excel. Now (hopefully!) when you check your checkbox the button will appear. Hope this works for you K Dales -----Original Message----- I have been creating a spreadsheet and have been using a lot of the suggestions here to create it however I have now hit a snag. This is what I currently have done: I have created a button that you press that is linked to a macro that will send emails along with attachments. It works great but sometimes you accidentally press the button it will do what its supposed to do. What I did was create a linked checkbox. What I would LIKE to be able to do is ONLY show the button if the checkbox is checked. Can I do that? I would really like to be able to do it without VB as I really dont know how to program. -- sungen99 ---------------------------------------------------------- -------------- sungen99's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=9144 View this thread: http://www.excelforum.com/showthread...hreadid=267636 . |
All times are GMT +1. The time now is 09:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com