PDA

View Full Version : Creating a control



CodeNinja
06-14-2012, 10:43 AM
Like many of you, I am using this forum to learn and because it is fun to figure out how to do something new. When excel moved to 2010, a control (datepicker) was no longer supported, and caused me to create a workaround to select dates. I made a userForm that allows the user to select a valid date, and it works fine.

My objective is to create an actual control that could be placed on a userForm that would function the same way as my date picker form.
I am NOT asking you to provide me with the solution, nor am I asking you to show me an alternate date picker tool... What I would like is to learn by making this into a control, which I have never done before. If anyone has any suggestions where I begin, that would be of great help. If not, I hope you can use my date Picker form and enjoy it...

The date picker is a userform and a module... by calling the function getDate, it opens the userform and will return the date selected.


Thanks,

CodeNinja.

Kenneth Hobs
06-14-2012, 11:46 AM
To create an OCX, search for: Create OCX Control

CodeNinja
06-14-2012, 12:11 PM
Ok, that's a start... Thanks.

CodeNinja
06-14-2012, 12:31 PM
After a little searching, it looks like most OCX control creation is done in VB. Is it possible to create these controls strictly in excel VBA? (I do not have VB.Net or any active version of VB)

Kaos_King
06-19-2012, 07:32 PM
Codeninja any change you could post the Date Picker file again as I can not download it. The file opens blank.

GTO
06-19-2012, 07:52 PM
Codeninja any change you could post the Date Picker file again as I can not download it. The file opens blank.

Hi Kaos,

After opening the file, open VBE and you will see the form and code. You can run the form by running the sub "test".

Kaos_King
06-19-2012, 09:49 PM
Hi GTO thanks for the info on viewing this.