Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error saying Control object does not have Enable property.
I have a subroutine that accepts a Frame object as a parameter. I am trying
to cycle through the controls in the frame to set the enable properties of the controls based on some criteria. Here is the subroutine: Public Sub EnableObjects(ByRef fraEnable As Frame, ByRef myCheckBox As _ CheckBox) Dim cCtl As Control For Each cCtl In fraEnable.Controls If cCtl.Name < myCheckBox.Name And TypeName(cCtl) < "Label" And _ cCtl.Name < "txtTalentMod1Total" Then cCtl.enable = True <---Error happens here! End If Next cCtl End Sub When it get to the line, cCtl.enable = True I get an "Object doesn't support this property or method" error (Error 438). Why would a control object not have an enable property? What am I doing wrong? Thanks, Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error saying Control object does not have Enable property.
Mike,
The first thing I see is that "enable" should be "enabled" -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "MikeAllgood" wrote in message I have a subroutine that accepts a Frame object as a parameter. I am trying to cycle through the controls in the frame to set the enable properties of the controls based on some criteria. Here is the subroutine: Public Sub EnableObjects(ByRef fraEnable As Frame, ByRef myCheckBox As _ CheckBox) Dim cCtl As Control For Each cCtl In fraEnable.Controls If cCtl.Name < myCheckBox.Name And TypeName(cCtl) < "Label" And _ cCtl.Name < "txtTalentMod1Total" Then cCtl.enable = True <---Error happens here! End If Next cCtl End Sub When it get to the line, cCtl.enable = True I get an "Object doesn't support this property or method" error (Error 438). Why would a control object not have an enable property? What am I doing wrong? Thanks, Mike |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error saying Control object does not have Enable property.
Ah, my inability to edit my own spelling rears its oh so ugly head again! I
feel stupid now. Thanks Jim! "Jim Cone" wrote: Mike, The first thing I see is that "enable" should be "enabled" -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "MikeAllgood" wrote in message I have a subroutine that accepts a Frame object as a parameter. I am trying to cycle through the controls in the frame to set the enable properties of the controls based on some criteria. Here is the subroutine: Public Sub EnableObjects(ByRef fraEnable As Frame, ByRef myCheckBox As _ CheckBox) Dim cCtl As Control For Each cCtl In fraEnable.Controls If cCtl.Name < myCheckBox.Name And TypeName(cCtl) < "Label" And _ cCtl.Name < "txtTalentMod1Total" Then cCtl.enable = True <---Error happens here! End If Next cCtl End Sub When it get to the line, cCtl.enable = True I get an "Object doesn't support this property or method" error (Error 438). Why would a control object not have an enable property? What am I doing wrong? Thanks, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I find out property values for each control object? | Excel Discussion (Misc queries) | |||
ddm enable/disable: Object doesn't support this property, my a** it doesn't | Excel Discussion (Misc queries) | |||
Object Postioning property not available for control | Excel Programming | |||
Object doesn't support this property or method (Error 438) | Excel Discussion (Misc queries) | |||
Error accessing external object property vbe | Excel Programming |