Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default 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

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shrinking Checkbox and Radio Button Dennis C BroadWare Excel Discussion (Misc queries) 0 November 10th 06 03:01 PM
Border problem with one row but no snag in many rows Hari[_3_] Excel Programming 3 September 7th 04 04:32 PM
properties of excel button/checkbox yaniv Excel Programming 1 August 6th 04 03:16 AM
Conditional Button Enabling based on Checkbox Todd uttenstine Excel Programming 11 November 25th 03 12:45 PM
Button Enabling based on check in checkbox Todd Huttenstine[_2_] Excel Programming 2 November 25th 03 04:56 AM


All times are GMT +1. The time now is 10:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"