Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
William DeLeo
 
Posts: n/a
Default ddm enable/disable: Object doesn't support this property, my a** it doesn't


I have a series of blocks of code that enable/disable radio buttons and
drop down menus. But when I run it, most times (but not ALL times) I
get the "object doesn't support this property of method" error pointing
to the ".enabled = FALSE" line. I know it soemtimes works as I can see
the affect of the disable/enable call. BUT it usually bombs.

Any idea from anyone as to why this would fail to execute at times???
Would it fail if it is already set to FALSE and I am trying to set it
to FALSE? If so, how would I add a conditional to check first (my
attempt at that bombed too, but perhaps for syntax reasons).

TIA WD

Here are a couple examples of the code:

1.
Sheets("Edit Usage").Shapes("Drop Down 31").Select
With Selection
.Enabled = True
End With

2.
Sheets("Edit Usage").Shapes("Drop Down 1").Select
With Selection
.Enabled = False
End With


--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile: http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551911

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default ddm enable/disable: Object doesn't support this property, my a** itdoesn't

I think I'd just use the DropDowns collection:

sheets("edit usage").dropdowns("drop down 31").enabled = true 'false



William DeLeo wrote:

I have a series of blocks of code that enable/disable radio buttons and
drop down menus. But when I run it, most times (but not ALL times) I
get the "object doesn't support this property of method" error pointing
to the ".enabled = FALSE" line. I know it soemtimes works as I can see
the affect of the disable/enable call. BUT it usually bombs.

Any idea from anyone as to why this would fail to execute at times???
Would it fail if it is already set to FALSE and I am trying to set it
to FALSE? If so, how would I add a conditional to check first (my
attempt at that bombed too, but perhaps for syntax reasons).

TIA WD

Here are a couple examples of the code:

1.
Sheets("Edit Usage").Shapes("Drop Down 31").Select
With Selection
Enabled = True
End With

2.
Sheets("Edit Usage").Shapes("Drop Down 1").Select
With Selection
Enabled = False
End With

--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile: http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551911


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
William DeLeo
 
Posts: n/a
Default ddm enable/disable: Object doesn't support this property, my a** it doesn't


I first tried just replacing the "shapes" with "dropdowns" and got the
same error message. Then I got rid of the "select" and "with
selection" statements, and that worked. I guess it had something to do
with the selection (didn't like that part anyway) :)

I also followed your lead and replaced "shapes" with "optionbuttons"
(also worked).

Dave rules.

Thanks (again)

WD

p.s. seriously ... is there anything I can do to pay back the board for
all the help I have received? Should I answer some easy ones now and
then or does that not matter? I live by "Fairly Take and Fairly Give".


--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile: http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551911

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default ddm enable/disable: Object doesn't support this property, my a** itdoesn't

When you see a post that you want to answer, answer it.

Or even hold a door open for someone <bg.



William DeLeo wrote:

I first tried just replacing the "shapes" with "dropdowns" and got the
same error message. Then I got rid of the "select" and "with
selection" statements, and that worked. I guess it had something to do
with the selection (didn't like that part anyway) :)

I also followed your lead and replaced "shapes" with "optionbuttons"
(also worked).

Dave rules.

Thanks (again)

WD

p.s. seriously ... is there anything I can do to pay back the board for
all the help I have received? Should I answer some easy ones now and
then or does that not matter? I live by "Fairly Take and Fairly Give".

--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile: http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551911


--

Dave Peterson
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
object reference does not support this property or method [email protected] Excel Discussion (Misc queries) 2 June 14th 06 07:23 PM
Property Let: assign return value of Double when passing String Tetsuya Oguma Excel Discussion (Misc queries) 1 March 3rd 06 08:01 AM
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
List of property names and values for a given object. MichaelMalone Excel Worksheet Functions 0 September 16th 05 09:49 PM
Object doesn't support this property or method (Error 438) Kiran Excel Discussion (Misc queries) 1 July 12th 05 08:42 PM


All times are GMT +1. The time now is 08:56 PM.

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

About Us

"It's about Microsoft Excel"