Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default "box-select" mode

Hi,

I now understand that:
Application.CommandBars("Drawing").Controls("Selec t Objects").Execute puts
me into the box-select mode. And running
Application.CommandBars("Drawing").Controls("Selec t Objects").Execute again
puts me out of box-select mode.

Is there a way to tell if the control("select objects") is currently
selected because sometimes I want to only excute that code if it is not
currently in the box-select mode.

Thanks for you help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default "box-select" mode

Maybe you can use something like:

Dim myCtrl As CommandBarControl
Set myCtrl = Application.CommandBars("Drawing").Controls("Selec t Objects")
If myCtrl.State = msoButtonUp Then
MsgBox "ready to turn on"
myCtrl.Execute
Else
MsgBox "already clicked"
myCtrl.Execute
End If




borg wrote:

Hi,

I now understand that:
Application.CommandBars("Drawing").Controls("Selec t Objects").Execute puts
me into the box-select mode. And running
Application.CommandBars("Drawing").Controls("Selec t Objects").Execute again
puts me out of box-select mode.

Is there a way to tell if the control("select objects") is currently
selected because sometimes I want to only excute that code if it is not
currently in the box-select mode.

Thanks for you help!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default "box-select" mode

Thank you for the help! It is much appreciated.

"borg" wrote:

Hi,

I now understand that:
Application.CommandBars("Drawing").Controls("Selec t Objects").Execute puts
me into the box-select mode. And running
Application.CommandBars("Drawing").Controls("Selec t Objects").Execute again
puts me out of box-select mode.

Is there a way to tell if the control("select objects") is currently
selected because sometimes I want to only excute that code if it is not
currently in the box-select mode.

Thanks for you help!

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
Mkae Mode function return "" instead of #N/A when there is no Mode Tonso Excel Discussion (Misc queries) 1 March 11th 07 10:38 AM
Mkae Mode function return "" instead of #N/A when there is no Mode Tonso Excel Discussion (Misc queries) 2 March 10th 07 05:10 PM
"Control" plus "click" doesn't allow me to select multiple cells Ken Cooke New Users to Excel 0 September 25th 06 04:46 PM
Make "Edit" mode default, rather than "Enter"? Greg Boettcher Excel Discussion (Misc queries) 1 July 27th 06 01:46 AM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM


All times are GMT +1. The time now is 10:19 AM.

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"