-
Good evening/morning
I have a question about making an activeX control work with a form. I am quite new and am getting a little frustrated with this.
My dilema is that I am making an activeX control that has a Command button on it, along with a Microsoft Common Dialog Control (also ActiveX)
The end product that I wish to achieve is, when the command button is pressed that the color dialog comes up. You pick the color, click OK, and the form changes to that color.
However, all the code is contained in the ActiveX control and none in the Form.
This is working up to this point. However I don't want to bore you with my several attempts at failing
Active X Control
Private Sub cmdColor_Click()
RaiseEvent myCol
dlgPicCol.ShowColor
End Sub
Thank you for all replies,
I really appreciate this,
burnvega
-
My gess would be to show and get the color information before raising the event. I'd also set up the Event to have parameters so that You would be able to pass them to your main form.
Code:
Public Event MyCol(Color As Variant)
Private Sub cmdColor_Click()
dlgPicCol.ShowColor
RaiseEvent MyCol(dlgPicCol.Color)
End Sub
I haven't actually worked with the Color Picker of the common dialog control, but I hope that this helps you out.
-
I think that is my problem,, not being able set up the perameters to acces the main Form
Thank you for your reply Excalibur