Excel 2007
Trying to achieve this:
IF A1 is not equal to null
THEN show the checkbox
ELSE hide the checkbox
I have to do this for 10 other checkboxes for the data in A1:A10.
Thanks in advance!
--Kalyan
Excel 2007
Trying to achieve this:
IF A1 is not equal to null
THEN show the checkbox
ELSE hide the checkbox
I have to do this for 10 other checkboxes for the data in A1:A10.
Thanks in advance!
--Kalyan
Last edited by kalyanverma; 01-12-2011 at 01:46 PM.
Assuming your check boxes are named Check Box 1 through to Check Box 10 this should work:
Please Login or Register to view this content.
Dom
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
Thanks Dom,
It works when I try this on a new workbook. I'm having a hard time using it on my existing workbook.
I have 125 check boxes
Check Box 479 to Check Box 603
I want them to show/hide based on values in Cells L12 to L136.
Ex:
IF L12 is not null THEN show Check Box 479 ELSE hide Check Box 479
IF L13 is not null THEN show Check Box 480 ELSE hide Check Box 480
and so on...till L136 and Check Box 603
Any specific code?
Thanks in advance!
Similar code adjusted as you decribe:
Please Login or Register to view this content.
Dom
Last edited by Domski; 01-12-2011 at 10:59 AM.
Dom,
unable to get this working. Attached is an example. Can you check what am I missing?
Thanks
Works okay for me.
If you press Delete on each cell in F2:F6 it will hide the check box and then entering something will cause it to appear again.
Dom
It works for me now. However, when I copy paste a range into F2:F6, it throws a Run-time error '13' Type mismatch. And when I do a Debug, it highlights "If Target.Value <> "" Then" part of the code.
I think you either need to limit the user to changing one cell at a time like in my previous example or loop through each cell in the cells that are changed like this:
Please Login or Register to view this content.
Dom
Wonderful. Works like a charm.
Don't want to bug you anymore, but one last question.
Can we dynamically change the underlying hyperlink of a cell?
Ex:
A1: Text (underlying hyperlink mapped to A2)
A2: www.google.com
When the hyperlink is changed in A2, the underlying hyperlink should also be changed in A1.
Thanks
Got it. Guess I have to use the HYPERLINK function. Thanks
Aye, that's the one.
Laters,
Dom
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks