473,602 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't delete a checkbox

2 New Member
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 1735
kadghar
1,295 Recognized Expert Top Contributor
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
macxrbest
2 New Member
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 Recognized Expert Top Contributor
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.Sha pes("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
6614
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 well. Then you can select all the logs you want to delete, hit a delete Link and send the variables in a script... Can you do that without having a form ?
1
1932
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: Sub Submit(Source as Object, E as EventArgs) Select Case strCommand
4
2160
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 through a code-behind. I have a gridview called gridview1. When the user checks a bunch of plans then should be able to hit delete and for each checked box it should delete the plan and update the gridview1. Imports System.Data Imports...
9
2788
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 this: id Name Surname pictr0 picrt1 pictr2 pictr3
1
3990
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 need to turn it into a Form to be able to capture whats been checked but I would appreciate any guidance. Most of the code I am using is from a solution a co-worker wrote for another solution and I learning by using it as a guide/example if...
2
3983
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 i have a checkbox next to each useriD. I also have a Delete button. SO what i want is when delete is clicked it will delete all items which are checked. My code <?php $a=0; $i=0; While ($row =mysql_fetch_array($rs)) { $currentCom_id =...
4
14223
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 this "<input type='checkbox' name='checkbox' value='1'><input type='checkbox' name='checkbox' value='2'>" and the check all boxes function worked but it doesnt work with my PHP code where it is something like this : $checked = $_POST; for($i=0;...
1
2814
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 name="form1" method="post" action=""> <p> <?php
13
26909
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.. Regards Ramprakash /*Adminpage.jsp*/ <%@ page language="java" import="java.sql.*"%> <html> <head>...
1
4127
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) and this should be done when the deletecontact button is clicked and also should be deleted int the database also Somebody help me out on this code <html> <head> <script type="text/javascript"> function SetAllCheckBoxes(FormName,...
0
7993
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8404
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6730
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5867
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5440
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2418
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.