473,394 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Can't delete a checkbox

I have checkboxes in a simple spreadsheet being used to check when a cable is terminated. I'm not using any code with the checkboxes. When I added the checkboxes to the spreadsheet, two extra have showed up in the middle of the page and they can't be deleted. I need some vb code to delete either specific checkboxes or all of them.
Feb 22 '08 #1
3 1720
kadghar
1,295 Expert 1GB
I have checkboxes in a simple spreadsheet being used to check when a cable is terminated. I'm not using any code with the checkboxes. When I added the checkboxes to the spreadsheet, two extra have showed up in the middle of the page and they can't be deleted. I need some vb code to delete either specific checkboxes or all of them.
No, just right click on them, so you can select them and then press Delete.

Also you can set its visible property to false in VBA,

HTH
Feb 22 '08 #2
umm, that's my problem, I've been right clicking them and doing a cut, but they're still there. I also do a format control and change the protection so they're not locked. When I right click them again and select cut, they remain and protection is reset to locked.
Feb 22 '08 #3
kadghar
1,295 Expert 1GB
umm, that's my problem, I've been right clicking them and doing a cut, but they're still there. I also do a format control and change the protection so they're not locked. When I right click them again and select cut, they remain and protection is reset to locked.

The locked property is set true as default, but it'll only take effect if the whole worksheet is protected. so i think you should un protect it in order to eliminate it.

Anyway, to delete it with code, you'll have to find out its name. To find the box's name just record a macro. Select it, move it, or do anything with it. then go to the VB editor, there you'll see the code you've recorded, and its name should appear in a line of code like this:

ActiveSheet.Shapes("Check Box 1").Select

its name is "Check Box 1"

Errase the macro and write something like

Expand|Select|Wrap|Line Numbers
  1. sub anything()
  2. ActiveSheet.Shapes("Check Box 1").Delete
  3. end sub
but using the name you've just obtained.
then press F5 while the text cursor is on any of those 3 lines to run the code (or run it from the menu or any method you want to use).

That should do.

HTH
Feb 22 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Angelos | last post by:
I have this list of logs stored in a MySQL DB. I display them in a list and next to each log I have a del view LINK I want to add Checkboxes next to each log and keep del and view links as...
1
by: Qnavry | last post by:
I am creating one page to edit, delete, and add data to a database. The Add code works but the Edit and Delete do not. What am I doing wrong? If you need more code let me know. Thanks Code:...
4
by: MasterChief | last post by:
I am trying to learn how to delete multple items in a database using the code behind file. I would just like somebody to tell me what is wrong with my code. I am new to connecting to the database...
9
by: Dejan | last post by:
Hy, Sorry for my terreble english I have this simple code for deleting rows in mysql table... Everything works fine with it. So, what do i wanna do...: my sql table looks something like...
1
by: bigabytes | last post by:
I'm just learning PHP (extreme novice) and I'm struggling with deleting records using a checkbox included within each row. I have a few idea but I'm not sure if my thoughts are correct. I think I...
2
by: arizal | last post by:
Hi, I am having some problem trying to think how to write a code for deleting the entry which is loaded from the database. I have a while loop which pulls the userID, name etc from the database and...
4
by: it2051229 | last post by:
Well i'm having a problem with the compatibility of javascript and PHP multiple delete check box.. i used a javascript for the "CHECK ALL BOXES" just like yahoo mail.. so my input is something like...
1
by: chocciies | last post by:
Hi! I want to delete multiple record via checkboxes. However, with no success. Is there sthg wrong with the value of my checkbox? Your help will be greatly appreciated. Thanks! <form...
13
by: ramprakashjava | last post by:
hi, i hav "java.lang.NullPointerException" error while Deleting table records using checkbox in jsp here i enclosed files help quickly plzzz.. ...
1
by: ahilar12 | last post by:
Hi all, I am new to php,my question is that in this following code i am retrieving many rows from the database which is working good.i want to delete a particular row(s) which is checked(checkbox)...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.