944,137 Members | Top Members by Rank

Ad:
Sep 15th, 2006
0

Excel Macro VBA Help

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mazza 412 is offline Offline
4 posts
since Sep 2006
Sep 16th, 2006
0

Re: Excel Macro VBA Help

Click to Expand / Collapse  Quote originally posted by mazza 412 ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
lakshmaiahv1108 is offline Offline
1 posts
since Sep 2006
Sep 16th, 2006
0

Re: Excel Macro VBA Help

If you post the macro code, we can help you out a little bit more.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Sep 18th, 2006
0

Re: Excel Macro VBA Help

Click to Expand / Collapse  Quote originally posted by Comatose ...
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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mazza 412 is offline Offline
4 posts
since Sep 2006
Sep 18th, 2006
0

Re: Excel Macro VBA Help

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....
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Sep 18th, 2006
0

Re: Excel Macro VBA Help

I can't thank you enough for your help! I hope we can get this to work.
Attached Files
File Type: zip Blood Work Requisition_2.zip (42.6 KB, 32 views)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mazza 412 is offline Offline
4 posts
since Sep 2006
Sep 18th, 2006
0

Re: Excel Macro VBA Help

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:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. ActiveSheet.CheckBox6.Value = 1
  2. ActiveSheet.CheckBox7.Value = 1
  3. 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....
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Sep 20th, 2006
0

Re: Excel Macro VBA Help

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mazza 412 is offline Offline
4 posts
since Sep 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: help me
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: vb program on network





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC