Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Toggle Selection Mode

I am not sure how to ask this but here goes...

In the Drawing Toolbar there is an icon that looks like a white arrow that
allows you to toggle between a "hand" icon or a "NWSE" icon when the cursor
is over a button, can anyone tell me what is the code that allows for the
toggle to switch back and forth? I hope this makes sense.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default Toggle Selection Mode

Hi borg,

If you mean the arrow that switches you into "box-select" mode, it's not a
'toggle' in the sense of the true meaning of toggle. It basically does the
same thing as the Design Mode button in that it turns "box-select" mode on or
off.

When we refer to toggling, we mean we are reverting a setting. For example,
to "toggle" the visibility of a toolbar, the code would be:

Commandbars("whatever").Visible = Not Commandbars("whatever").Visible

so that if it's visible, it becomes not visible; ..and vice versa.

HTH
Regards,
GS

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Toggle Selection Mode

Hi Borg,

Application.CommandBars("Drawing").Controls("Selec t Objects").Execute

The above line would programatically click the button for you. Be aware
that it would throw an error if the Select Objects button were not present on
the Drawing toolbar. The following routine would restore the button if it
wasn't there, and then click it.

Sub ToggleSelectObjects()
Dim CBC As CommandBarControl
On Error GoTo RestoreSelectObjectsButton
Set CBC = Application.CommandBars("Drawing").Controls("Selec t Objects")
CBC.Execute
Exit Sub
RestoreSelectObjectsButton:
Set CBC = Application.CommandBars("Drawing").Controls.Add _
(Type:=msoControlButton, ID:=182, Befo=2)
Resume Next
End Sub



Regards,
Vic Eldridge



"borg" wrote:

I am not sure how to ask this but here goes...

In the Drawing Toolbar there is an icon that looks like a white arrow that
allows you to toggle between a "hand" icon or a "NWSE" icon when the cursor
is over a button, can anyone tell me what is the code that allows for the
toggle to switch back and forth? I hope this makes sense.

Thanks!

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
Why does Selection.PasteSpecial toggle Application.ScreenUpdating OssieMac Excel Worksheet Functions 2 August 4th 09 12:05 AM
Selection Mode Stuck rainborick New Users to Excel 4 March 23rd 06 07:33 PM
User controls on sheet question. - How to toggle between design and execute mode? Hexman Excel Programming 1 December 22nd 05 01:06 AM
Selection mode problem Richard L. Trethewey New Users to Excel 2 November 23rd 05 07:45 PM
Wide Selection of Absolute Reference Toggle Sharon Excel Discussion (Misc queries) 4 April 19th 05 04:45 AM


All times are GMT +1. The time now is 04:04 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"