ActiveX controls only work in Single window
I often uses list and comboboxes which I populated programatically with events
"PapaDos" wrote:
The "Forms" objects are not activeX objects, they don't have events or
dedicated VBA code or "properties" dialog. Depending on what you are doing,
they may not be powerful enough.
You can manipulate them a bit in VBA, they are considered "Shapes" of the
worksheet where they appear.
For example
debug.print Sheet1.shapes(1).name
will print the name of the first shape of Sheet1 in the immediate window.
You can use the name of the shape as an index to "shape" also.
Without knowing how you currently use your controls, I can't tell you if the
"Forms" controls are good enough for the job, but they are adequate in many
situations...
--
Regards,
Luc.
"Festina Lente"
"ExcelDeveloper" wrote:
That is a possible alternative, but you don't seem to be able to get at the
properties of the controls like you can with the controls in the control
toolbox. For example how can I name the control or use events like on focus
and click to fill a listbox. It seems like I can only assign a macro to the
controls.
"PapaDos" wrote:
Maybe you can use the controls from the "Forms" toolbar instead of the
"Control ToolBox". They don't have that limitation (at least command buttons
and listboxes work ok)...
--
Regards,
Luc.
"Festina Lente"
"ExcelDeveloper" wrote:
Hi,
I have a workbook where I have created multiple windows using the
ActiveWindow.NewWindow & Application.Windows.Arrange methods.
My problem is that the workbooks has several embedded
ActiveXControls(listboxes,commandbuttons,etc.). If you click on the control
in any of the windows other than the first window, the control doesn't
respond.
To use the control you must go to the first window and select the control
from there. At this point the control appears on the other windows with black
lines running diagonnally across it.
Is there any way to get around this behavior without having to move the
worksheet controls off the sheet and into a command bar or menu?
thanks,
Ben
|