PDA

View Full Version : Make my own Control



Tiger Chen
09-12-2006, 10:49 PM
I know how to make my own ActiveX control by using VB.

Is it possible to make our own forms? or Chart objects? How?

Net, I would like make a control and link to a range. When the data in that range changes, the control changes accordingly, without to run any code or click anything.

Thanks in advance!

johnske
09-13-2006, 01:06 AM
I know how to make my own ActiveX control by using VB.

Is it possible to make our own forms? or Chart objects? How?Hi Tiger,

If you mean VBA, you can create forms in the VBE window by going to Tools>Insert>Userform


Net, I would like make a control and link to a range. When the data in that range changes, the control changes accordingly, without to run any code or click anything.

Thanks in advance!If you have oFFICE 2000 or greater you can access Office Web Components (OWC) and insert spreadsheets, charts etc onto the form - have a look here (http://xlvba.3.forumer.com/index.php?showtopic=209) for a basic example to get you started

Regards,
John :)

Tiger Chen
09-13-2006, 02:56 AM
You know, there are two kinds of controls we can use from Excel Main window: Forms and Control Toolbox.

For Forms, for example, the listbox. We can set the data sourse and control range.

What I want is to make something like forms (or Chart,...) by VB. When user use it, don't need any code.

I know how to use VB make activeX control. We can use it like a build in control after registration.

Tiger Chen
09-19-2006, 06:14 AM
Should I give up?

johnske
09-19-2006, 12:56 PM
Hi Tiger,

I don't understand exactly what it is that you want to do here...

Do you want to embed a form on the worksheet? (You can simulate a form by creating a large forms command button and placing other controls on it).

Do you just want to create a chart programattically?

Regards,
John :)

Tiger Chen
09-21-2006, 03:51 AM
I want to create my own Forms (or chart object) by using VB code. A simple example, how can we create a Listbox (Forms, not ActiveX control)?

In other word, how Microsoft develop Forms and Chart objects?
There are should be in a .dll file. But, can it be developed by VB language? How to make a very simple one?

johnske
09-21-2006, 05:29 AM
I want to create my own Forms (or chart object) by using VB code. A simple example, how can we create a Listbox (Forms, not ActiveX control)? Simple example...
Option Explicit

Sub AddListBox()

ActiveSheet.ListBoxes.Add(170, 25, 190, 180).Select
With Selection
.ListFillRange = "$A$1:$A$20"
.Display3DShading = True
End With

End Subrecord a macro of you performing the actions you want


In other word, how Microsoft develop Forms and Chart objects?
There are should be in a .dll file. But, can it be developed by VB language? How to make a very simple one??this seems to indicate that you want to develop a stand-alone project in VB and not VBA? :dunno

Tiger Chen
09-22-2006, 03:33 AM
Yes, you are getting to my point. Any thoughts?

Sorry, this may not be the right question I should to ask in VBA forum.