Create an activeX control on the fly with VBA

S

shawn090

Can someone explain to me or give me a code snippet in VBA which can
create an activeX control on the fly? I would like to be able to create
a progressbar control on the fly. Thanks for any help!
 
C

Cindy M -WordMVP-

Hi Shawn090,
Can someone explain to me or give me a code snippet in VBA which can
create an activeX control on the fly? I would like to be able to create
a progressbar control on the fly.
VBA cannot CREATE ActiveX controls at all. You can put ActiveX controls
on forms and use them. There are also ways to make a "progress bar" using
only things available in the controls for UserForms. I think there's an
article on this on the word.mvps.org website.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
S

shawn090

Thanks Cindy! After doing some more digging, I came to the same
conclusion. In order for form to be able to "create" the controlit has
to be in design and not run-time.

I ended up creating a seperate form with a couple lables (% complete
and current record), my aX progress bar and an abort button. I then
just made a public variable which the abort button sets if clicked. I
think initally I over complicated the problem. This solution seems to
work much better, is simpler and is much more accessible from other
code/forms. Thanks again for your input!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top