Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Create an activeX control on the fly with VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shawn090 - 30 Dec 2005 14:33 GMT
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!
Cindy M  -WordMVP- - 31 Dec 2005 15:51 GMT
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 :-)
shawn090 - 03 Jan 2006 14:34 GMT
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!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.