Link to home
Start Free TrialLog in
Avatar of Massimo Scola
Massimo ScolaFlag for Switzerland

asked on

Additional controls in VBA userforms?

Hello everyone

I work a lot with userforms in Excel, but I find the controls quite boring.
Is it possible to install new controls?

Massimo
Avatar of rspahitz
rspahitz
Flag of United States of America image

Yes!
In the toolbox, right-click and select Add Controls.  you'll see a lot of components that it pulls from the registry, some of which will work well with your forms (especially the Microsoft ones.)
you can also get there from menu Tools | Additional Controls.
One that I like to add is the WebBrowser control, which uses the IE engine to load web pages.
If you've built your own OCXs, I think it supports those too, if they are registered.
You cab even have a spreadsheet within a UserForm
Avatar of Massimo Scola

ASKER

Thanks, I 've just had a look at them.
I do not know how to create OCXs.
Are there companies that are specialised with controls?
SOLUTION
Avatar of patrickab
patrickab
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Patrick, doesn't work on Office 2010 :-(
"Could not load object .." - same message like when I try to open a form with a calendar control..

:-/
I only hav Xl2002 so I can't test it on XL2010
There used to be companies specializing in OCXs but I haven't heard of any lately.  With DotNet, it's so much easier to create custom controls that maybe the market shrank.

Are you looking for anything in particular?  It could probably be built with VB6 and made available to Excel (although it's been a while since I cracked open my VB6 app.)

another possibility is to simply get the VB.Net 2010 Express edition, free from microsoft.com, then create an app that manages an Excel 2002 spreadsheet through the advanced forms.
Attached is a screenshot of a worksheet on a UserForm

Patrick
MWSnap-018-2011-03-08--23-15-02.jpg
Hi Patrick

Looks nice. Too bad it doesn't work with the new Excel

rspahitz: well, I'm looking for controls that look "cool" - something to impress my boss. The vba excel userforms look very dated. Are you saying that .net controls will work with excel userforms?
.net controls typically *replace* excel userforms.
Rather than have Excel launch the user form, you have the .net form launch and manage the excel sheet, similar to what Patrick is showing above.

The nice thing about VB.Net 2010 is that it's current so it has all the new looks to it.

However, another option, which will take some work, is to use a picture control to create cool pictures and intercept the mouse-over and mouse-move events to do cool things while the mouse is over the picture.  I guess it depends what you really want to do.  but I suggest looking at some of the controls in VB.Net to see what you think is nice, then maybe think about making a version of it for the old Excel 2002
This link should let you download VB.Net:

http://www.microsoft.com/express/Downloads/#2010-Visual-Basic

I think you'll need to register it at some point with a free MSDN account.
Well.. that sounds interesting. Do you have any idea why Patrick's code doesn't run on the latest version of Excel?

Are you saying that, after having learned about Excel and Access, the next step would be to learn how to program in Visual Basic?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Do you know the name of the control Patrick put in his form?

I used to work with Access and my current job allows me to work with Excel only, which can be very cumbersome at times. (not just the forms). I learned Java at school, so I guess I should not have difficulties getting started with VB? I have downloaded VB Express and will have a look at it when I'm at home.

In the meantime I will try and do my best with Excel.

Thanks a lot for your help
Thanks ms.

I don't see patrick's control in my list, but I think I've run across it before somewhere.
We'll have to see if patrick reports back to supply you with the name of the dll from the Toolbox/References
>We'll have to see if patrick reports back to supply you with the name of the dll from the Toolbox/References

Microsoft Office Spreadsheet 10
Interesting Patrick.  I don't have that in my control list or in my references.  Can you tell the dll name?