Form Control versus Active Control? When to use which?

L

LightLY

Dear Excel experts,

I am starting to use Excel 2010 VBA. I am confused over form control
and active controls. It seems they are quite similar. May I know under
what situation should one use form control or active control?

My understanding based on what I have read and tried is that when one
needs to write VBA code, use active control. Other than that, use form
control. Is this correct?

Thank you.
 
J

Jim Cone

Form controls are less complicated (fewer options) and have less overhead (memory requirements).
If form controls do the job and meet your needs they should be your first choice.
Both types of controls can be manipulated using VBA.

On the other hand, each successive release of XL has its unique features (problems).
Buttons of one type or the other can disappear, resize, move or act erratically depending
on how/when they are used, their settings and the Excel version.
Some of these issues belong to Microsoft and some to the user - cut and try sometimes is necessary.
--
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
(free and commercial excel programs)





"LightLY" <[email protected]>
wrote in message
news:b7ba6f90-6c2b-4db1-b177-d49a32354beb@v29g2000yqv.googlegroups.com...
 
H

Harald Staff

Adding to Jim:

If you need stuff to happen "all the time" then use ActiveX. They have
specific code running when you enter the control, when it changes value,
when you press a keyboard key, a mouse button, when you exit the control,
when you hover it, ... This is valuable when you need total control and
validation during the user experience.

If however all this can be done afterwards (like on the OK buttonclick) then
use the forms controls.

The annoying limitation I've met with ActiveX is that if you have two
windows of the same sheet open, the controls are visible in only one of
them. This may or may not have changed in version 2010. The annoying
limitation of forms controls is that the documentation was removed in Excel
....like 97? and haven't surfaced since. I use my Excel5 helpfiles even today
for those, and for dialogue sheets.

Best wishes Harald
 

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