R
Robb
I am developing an ocx in VB6 and everything is working fine there. Management has asked that it be
made to work in VBA so of course I have had to make some modifications. During one such edit/compile
something happened and the ocx will no longer drop onto a userform in VBA. It is available in the
toolbox but when I try to place it on a userform I get an error "Element Not Found".
After trying so many little things over the last few days to get this to work I'm getting fuzzy on
the original sequence of events. I had added a property that returned a public structure I defined.
That worked in VB apps. But in VBA it wouldn't. The developer trying to use my control said he ran
into a similar situation and his problem was resolved by converting the public property to a
function instead. So I did that. When compiling it warned me about breaking compatibility. I changed
the binary compatibility setting to none and compiled the control. Since that time it will no longer
drop onto a VBA form (still works in VB just fine).
Some things I have tried:
Removed the control from the VBA toolbox and reselected it.
Commented out the function in my control and recompiled it.
Put the compatibility setting back to Binary Compatibility and recompiled it.
Commented out every single line of code in my control and recompiled it.
Searched for and removed all cache files of my control (.exp extention)
Removed all references to my control from the registry
Tried adding the control to brand new blank vba 'projects/macros'
Various combinations of deleting, recreating, recompiling.
Any ideas?
Thanks,
Robb
made to work in VBA so of course I have had to make some modifications. During one such edit/compile
something happened and the ocx will no longer drop onto a userform in VBA. It is available in the
toolbox but when I try to place it on a userform I get an error "Element Not Found".
After trying so many little things over the last few days to get this to work I'm getting fuzzy on
the original sequence of events. I had added a property that returned a public structure I defined.
That worked in VB apps. But in VBA it wouldn't. The developer trying to use my control said he ran
into a similar situation and his problem was resolved by converting the public property to a
function instead. So I did that. When compiling it warned me about breaking compatibility. I changed
the binary compatibility setting to none and compiled the control. Since that time it will no longer
drop onto a VBA form (still works in VB just fine).
Some things I have tried:
Removed the control from the VBA toolbox and reselected it.
Commented out the function in my control and recompiled it.
Put the compatibility setting back to Binary Compatibility and recompiled it.
Commented out every single line of code in my control and recompiled it.
Searched for and removed all cache files of my control (.exp extention)
Removed all references to my control from the registry
Tried adding the control to brand new blank vba 'projects/macros'
Various combinations of deleting, recreating, recompiling.
Any ideas?
Thanks,
Robb