ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Syntax for de-selecting a control? (https://www.excelbanter.com/excel-programming/323539-syntax-de-selecting-control.html)

William DeLeo

Syntax for de-selecting a control?
 

Greetings,

I figure this is a frequent question but I could not find a thread o
site that gives me the answer so here goes ...

I am using the follwoing code to disable a control:

Sheets("WS_12").Shapes("Drop Down 4").Select
With Selection
.Enabled = False
End With

But I need to deselect it after, or not select it at all in the firs
place. Can someone suggest a way to disable this control and leave i
unselected (without selecting something else)?

Thanks in advance!

Bill

--
William DeLe
-----------------------------------------------------------------------
William DeLeo's Profile: http://www.excelforum.com/member.php...nfo&userid=125
View this thread: http://www.excelforum.com/showthread.php?threadid=34687


Jim Cone

Syntax for de-selecting a control?
 
Billy
,
This ought to work...

Sheets("WS_12").Shapes("Drop Down 4").Enabled = False

Regards,
Jim Cone
San Francisco, USA


"William DeLeo"
wrote in message ...

Greetings,
I figure this is a frequent question but I could not find a thread or
site that gives me the answer so here goes ...
I am using the follwoing code to disable a control:

Sheets("WS_12").Shapes("Drop Down 4").Select
With Selection
Enabled = False
End With
But I need to deselect it after, or not select it at all in the first
place. Can someone suggest a way to disable this control and leave it
unselected (without selecting something else)?
Thanks in advance!
Billy




All times are GMT +1. The time now is 01:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com