I have a form that I've created in excel. I am trying to write a macro to run behind it to work along with the check box ActiveX Controls I've inserted in the document. I asked one of my programmers to help and he said he cannot get the macro to work, it's saying the macro needs to be registered. How do I do this?

I have a form that I've created in excel. I am trying to write a macro to run behind it to work along with the check box ActiveX Controls I've inserted in the document. I asked one of my programmers to help and he said he cannot get the macro to work, it's saying the macro needs to be registered. How do I do this?

I have a solution for you...
its simple... reply me to know about it instantly...
Thanks
Lakshm

If you post the macro code, we can help you out a little bit more.

There isn't a code, YET. When I checked with my programmer, he said he can't open the file I e-mailed him because of the macro. So my understanding is since Excel created a macro when I inserted a control button option to the form, only my computer will be able to read the macro. I wanted to e-mail this form for people to use, however, if everyone needs to register it, that's going to make it difficult. How do/can I go about getting this out for people to use and get a code written for a macro to make it fool proof, any suggestions?

The macro is stored/saved inside of the excel document. He might have macro's disabled (or may not trust you, so wouldn't run your macro), in which case it wouldn't load it..... but the macro is saved in the file.... so if you attach the .xls document to a post here, we can download it and see what it's doing....

The method you are using is incorrect. By using the shapes collection, and then accessing the Select function, makes it the same as if you hold down shift and click a control. It just highlights the control, as if it were text, or a cell, or some other object. In order to actually check one of the box, you need to access it directly, using the .value property, as such:

ActiveSheet.CheckBox6.Value = 1
ActiveSheet.CheckBox7.Value = 1
ActiveSheet.CheckBox3.Value = 1

Something important to note here, is that you use boolean logic to represent the check mark... for example, replacing the = 1 to = 0 would take the check mark out of the box....

I think I understand and I’ve got something here… I think what I want is an If-Then construct, right? Do you know a code that will do this?
[if checkboxes 2"Sodium", 7"Potassium", 3"Chloride", 4"CO2", 5"BUN", 8"Glucose", 20"Creatine" = 1, then checkbox 1"Basic Metabolic"=1 and checkboxes 2 "Sodium", 7 "Potassium", 3"Chloride", 4"CO2", 5"BUN", 8"Glucose", & 20"Creatine" = 0?]
I’m using Boolean logic to represent the check marks as you said, the quoted words are the numbers of their coinciding check box beside them.

This article has been dead for over six months. Start a new discussion instead.