ActiveX control property

I have built an ActiveX control with a FileName property in which the user assigns a string value specifying the name of a file. I would like for my users to be able to browse for (and select) the file through a dialog box from the VB properties window similar to the way a FileName is selected for the RichTextBox control. How can I do this?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This article shows how to add a font property, and can be modified to do the same for a filename property.  

"HOWTO: Add a Custom Font Property to a User Control"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Can't be achieved in VB. The best thing you can achieve is to make the property a Friend property and then expose it through a property page.
STKeithAuthor Commented:
Thanks Erick37. That was just what I was looking for.
Glad Erick's suggestion worked for you. In VB it's always best to be flexible and not to insist on doing things one particular way. In this case, using a property page is the way to go, as indeed it says in Erick's article.

Just check my comment: if you make the property a Friend property (instead of a Public one) the user will *only* be able to change the property via the property page. If you make it a public property, the user could still enter rubbish in the normal property window. Which approach you take depends on how critical this is to the control, I suppose.

Good luck

STKeithAuthor Commented:
Thanks Pino, I'll give it a try.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.