473,883 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VBA Excel - checkbox property for worksheet class

reginaldmerritt
201 New Member
Hi,

Not used vb in excel before. Trying to get a button to set a lot of checkboxes to false.

Expand|Select|Wrap|Line Numbers
  1. For i = 15 To 103
  2.     ActiveSheet.CheckBoxes("Check Box " & i).Value = False
  3. Next
  4.  
I get the following message when i try to run the code.

Unbale to get the Checkbox property for worksheet class.

I searched online but don't really know what i'm looking for and all the solutions to errors for worksheet class seemed to centre around naming of sheets, but i haven't refered to any sheets in the code.

Any help would be great, thanks.
Mar 11 '11
11 16658
reginaldmerritt
201 New Member
That was my first thought but when i tried to create ActiveX contorls on my own version of the workbook i still got the same error, but it works on your version.

hmmm., So back to the drawing board, i turned my version back to Excel 2003 and deleted all the checkboxs and started from scratch with new ActiveX chcekboxes. Started with just 5 and ran the code and hey presto it worked.

Turns out that i must have had missing checkboxs from the sequence with in the loop. i.e. in a for next loop
For i = x to y, y was to high, no checkbox existed with that number and this would cause the same error as trying to use the code with some Form Control checkboxes.

I now have all the checkboxes as ActiveX controls and in sequence as well. Everything working well.

Much appreciation for all your help and time ADezii
Mar 31 '11 #11
ADezii
8,834 Recognized Expert Expert
The pleasure was all mine, glad it all worked out for you.
Apr 1 '11 #12

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

Similar topics

0
1104
by: Steve Menard | last post by:
As par of JPype, I find that I have to brifge Java static members into class attributes. I am using a metaclass to dynamically create a Python class for every Java type encountered. Instance variables were handled by adding a property(get, set) to the class's dictionary. Now static members are giving me a headache. I cannot use "property" for them, because properties are for instances only.
0
974
by: Bert | last post by:
Hi I am trying to add a property to a class that is derive from asp:placeholder. ? I have tried this but get an ambigous name error: Imports System.ComponentModel Imports System.Web.UI
4
2525
by: Avi | last post by:
Hi I am creating web application in which i want to assign by default values to the property which i had created my own. In that one of the property is of type color and i am unable to assign any value to that color type property.. my code is Dim Col1Color as String
9
2033
by: tirrell payton | last post by:
Hello, I am trying to manipulate the properties of a form's controls from a class. I dont want to make the form's control public. Attached is a code snippet of what I am trying to accomplish: Public Form1() public void SetLabel4Text(string theText)
12
40169
by: ssh | last post by:
function testfn(name) var tbody = document.getElementById('hellospace').getElementsByTagName('tbody'); var row = document.createElement('TR'); var cell1 = document.createElement('TD'); cell1.align="left"; cell1.style.height = "22"; cell1.style.width = "15"; cell1.valign = "middle"; cell1.className = "dwInfo"; var inp1 = document.createElement('INPUT');
4
9181
by: joemo2003 | last post by:
In excel have one checkbox and one commondbutton. Inside the checkbox VBA, when if checkbox=true, then do a run and write a text to excel cell, when if checkbox=false, then remove the text in excel cell. And in that commondbutton, it have VBA checkbox=false, and it remove will the checkmark and the text, but all i want is just remove the checkmark but not the text in excel cell. Any idea? Checkbox If checkbox=True then ... cell(1,1)=123...
3
1577
by: smugcool | last post by:
hi to all experts, I wrote a macro code, i got stuck in between as i am trying to import multiple excel workbooks variious sheets into an active worksheet. Requsting you to revert where i am going wrong. Sub ImportFile() Dim Str1 As String Dim i As Integer Dim j As Long
6
9118
FishVal
by: FishVal | last post by:
Hi, everybody. The thread title is actually the whole question. :) Does anybody know how to declare default method/property in Class module if it is possible at all? Any ideas/hints/links will be greatly appreciated. Regards, Fish
6
4831
by: Ang | last post by:
Is it possible to get the checkbox and radio button values from excel by c#? Thanks. *** Sent via Developersdex http://www.developersdex.com ***
1
6855
by: itsNOTaTOOMAH | last post by:
I have an Access query and/or table that I'm exporting into an Excel spreadsheet using the TransferSpreadsheet action in VBA: DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "QueryName", "C:\ExportedFile.xls" Using this particular code will export my data to a worksheet named "QueryName", but is there any way to export the query/table to Excel but to a tab with a different name - without renaming the query/table? For example,...
0
9933
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
11125
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10734
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
10836
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
10407
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
9568
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...
0
7114
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();...
0
5794
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5982
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.