Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I find out property values for each control object? Bob Allen[_2_] Excel Discussion (Misc queries) 3 July 30th 09 11:23 PM
ddm enable/disable: Object doesn't support this property, my a** it doesn't William DeLeo Excel Discussion (Misc queries) 3 June 14th 06 06:57 PM
Object Postioning property not available for control ts1 Excel Programming 0 September 22nd 05 06:47 PM
Object doesn't support this property or method (Error 438) Kiran Excel Discussion (Misc queries) 1 July 12th 05 08:42 PM
Error accessing external object property vbe NilovSerge Excel Programming 1 June 21st 04 12:48 PM


All times are GMT +1. The time now is 06:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"