| | |
Excel Macro VBA Help
![]() |
•
•
Join Date: Sep 2006
Posts: 4
Reputation:
Solved Threads: 0
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?
•
•
Join Date: Sep 2006
Posts: 1
Reputation:
Solved Threads: 0
•
•
•
•
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?
its simple... reply me to know about it instantly...
Thanks
Lakshm
•
•
Join Date: Sep 2006
Posts: 4
Reputation:
Solved Threads: 0
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:
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....
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
ActiveSheet.CheckBox6.Value = 1 ActiveSheet.CheckBox7.Value = 1 ActiveSheet.CheckBox3.Value = 1
•
•
Join Date: Sep 2006
Posts: 4
Reputation:
Solved Threads: 0
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.
[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.
![]() |
Similar Threads
- Excel Macro using vba :( (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: help me
- Next Thread: vb program on network
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






