Excel Macro VBA Help

Reply

Join Date: Sep 2006
Posts: 4
Reputation: mazza 412 is an unknown quantity at this point 
Solved Threads: 0
mazza 412 mazza 412 is offline Offline
Newbie Poster

Excel Macro VBA Help

 
0
  #1
Sep 15th, 2006
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?
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 1
Reputation: lakshmaiahv1108 is an unknown quantity at this point 
Solved Threads: 0
lakshmaiahv1108 lakshmaiahv1108 is offline Offline
Newbie Poster

Re: Excel Macro VBA Help

 
0
  #2
Sep 16th, 2006
Originally Posted by mazza 412 View 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?
I have a solution for you...
its simple... reply me to know about it instantly...
Thanks
Lakshm
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Excel Macro VBA Help

 
0
  #3
Sep 16th, 2006
If you post the macro code, we can help you out a little bit more.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 4
Reputation: mazza 412 is an unknown quantity at this point 
Solved Threads: 0
mazza 412 mazza 412 is offline Offline
Newbie Poster

Re: Excel Macro VBA Help

 
0
  #4
Sep 18th, 2006
Originally Posted by Comatose View Post
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?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Excel Macro VBA Help

 
0
  #5
Sep 18th, 2006
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....
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 4
Reputation: mazza 412 is an unknown quantity at this point 
Solved Threads: 0
mazza 412 mazza 412 is offline Offline
Newbie Poster

Re: Excel Macro VBA Help

 
0
  #6
Sep 18th, 2006
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, 21 views)
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Excel Macro VBA Help

 
0
  #7
Sep 18th, 2006
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....
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 4
Reputation: mazza 412 is an unknown quantity at this point 
Solved Threads: 0
mazza 412 mazza 412 is offline Offline
Newbie Poster

Re: Excel Macro VBA Help

 
0
  #8
Sep 20th, 2006
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC