Connecting Tech Pros Worldwide Forums | Help | Site Map

VBA How to create ActiveX controls

Member
 
Join Date: May 2009
Location: UK - Bristol
Posts: 36
#1: Jun 28 '09
Hi

There are some useful ActiveX controls in Access like Date Time Picker etc and I wonder how I can create them myself?

Any links to tutorials or books will be greatly appreciated.


Many thanks
Emil

ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,429
#2: Jun 28 '09

re: VBA How to create ActiveX controls


Quote:

Originally Posted by IT Couple View Post

Hi

There are some useful ActiveX controls in Access like Date Time Picker etc and I wonder how I can create them myself?

Any links to tutorials or books will be greatly appreciated.


Many thanks
Emil

I would imagine that the easiest Method of creating ActiveX Controls is via the Visual Basic Programming Language. Any good Reference on VB should point you in the right direction.
Member
 
Join Date: May 2009
Location: UK - Bristol
Posts: 36
#3: Jun 28 '09

re: VBA How to create ActiveX controls


Hi

Thanks for the reply. I have google the subject and found out that VB6 has has ActiveX control items and others but I don't have VB6 only .net 2008 so far I found the 'user control' might be the same but currently I'm still looking to found out if this is exactly what I want and if I can use it in Access.

Regards
Emil
ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,429
#4: Jun 28 '09

re: VBA How to create ActiveX controls


Quote:

Originally Posted by IT Couple View Post

Hi

Thanks for the reply. I have google the subject and found out that VB6 has has ActiveX control items and others but I don't have VB6 only .net 2008 so far I found the 'user control' might be the same but currently I'm still looking to found out if this is exactly what I want and if I can use it in Access.

Regards
Emil

I'm not a .NET Expert, but from a little research, it looks like this may not be what you are looking for:

------------------------------------------------------------------------------------
VB.Net user controls are those controls that have other controls in them so that they provide a complex functionality if needed. Combining controls to form a VB.Net user control helps you to modularize the code that you are developing for your project.

User controls are created as .ascx file and these are added to the project in the bin directory of the project. After you create a user control you can add them to the tool palette so that you can use them just like any other control in the tool box.

For example you can combine a label and a textbox to create a user control. So whenever you drag and drop this user control from the toolbox you get a label and a textbox together.
------------------------------------------------------------------------------------

P.S. - My suggestion is that you also Post this Topic in the .NET Forum also available here. I'm assuming that once you obtain your answer there, the Control can be deployed within Access just like any ActiveX Control would be.
missinglinq's Avatar
Moderator
 
Join Date: Nov 2006
Location: Richmond, Virginia USA
Posts: 3,103
#5: Jun 28 '09

re: VBA How to create ActiveX controls


I think Visual Basic 6 and C++ are really the only languages available for ActiveX development. Here's a very good tutorial on the subject, which is actually a chapter from a book dedicated to just this subject. You probably need to pay particular attention to the part where the author explains why this is one of the most difficult areas of programming around and definitely not something for novices to attempt.

http://www.visualbasicbooks.com/activeXtutorial.html

Linq ;0)>
Member
 
Join Date: May 2009
Location: UK - Bristol
Posts: 36
#6: Jun 28 '09

re: VBA How to create ActiveX controls


Thanks for the information.

It might be a bit too late to use VB6 ;) so I will investigate the subject on .net forum soon.

Regards
Emil
PRR PRR is offline
Moderator
 
Join Date: Dec 2007
Posts: 717
#7: Jun 29 '09

re: VBA How to create ActiveX controls


You can take a look at this article for exposing a dll as activex (for .net).
If its for server side you are better off creating a dll and referencing it in your project.
ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,429
#8: Jun 29 '09

re: VBA How to create ActiveX controls


Quote:

Originally Posted by PRR View Post

You can take a look at this article for exposing a dll as activex (for .net).
If its for server side you are better off creating a dll and referencing it in your project.

Thanks for helping us 'Olde Access Guys' out on this, PRR.

Just for curiosity, once this ActiveX Control is created, can it be utilized within the context of an Access Form in the traditional manner?
PRR PRR is offline
Moderator
 
Join Date: Dec 2007
Posts: 717
#9: Jun 30 '09

re: VBA How to create ActiveX controls


You are most welcome ADezii. I am not entirely sure whether my post was helpful... Active x do have limitations. I guess this might be helpful...
My knowledge is very limited in this area....
ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,429
#10: Jun 30 '09

re: VBA How to create ActiveX controls


Quote:

Originally Posted by PRR View Post

You are most welcome ADezii. I am not entirely sure whether my post was helpful... Active x do have limitations. I guess this might be helpful...
My knowledge is very limited in this area....

Thanks again, RRR, your Post was very helpful. It appears as though Access does not exclusively rely on the IDataObject Interface that other Offfice Components do in displaying ActiveX Controls.

@IT Couple ==> Let's us know how you make out on this Project, since it does have aspects that relate to this Forum.
Reply