Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default switch on 'snap to' from vba

Does anyone out there know how to switch on the 'snap to grid' - drawing tools - using VBA? When I record a macro no code appears for this. I've tried 'msoSnapToGrid' etc etc.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default switch on 'snap to' from vba

Sub Macro4()
Dim btn As CommandBarButton
Set btn = CommandBars("Drawing").FindControl(ID:=549, Recursive:=True)
btn.Execute
End Sub

--
Regards,
Tom Ogilvy

"jngi" wrote in message
...
Does anyone out there know how to switch on the 'snap to grid' - drawing

tools - using VBA? When I record a macro no code appears for this. I've
tried 'msoSnapToGrid' etc etc.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default switch on 'snap to' from vba

I knew it was done through the CommandBars object, but it's so far down in the menu tree that it took some digging to find ...

Set cb = CommandBars("Drawing").Controls(1).CommandBar.Cont rols(5)_
.CommandBar.Controls(1)
if Not (cb.State = msoButtonDown) Then cb.Execute

Tom Lavedas
===========

"jngi" wrote:

Does anyone out there know how to switch on the 'snap to grid' - drawing tools - using VBA? When I record a macro no code appears for this. I've tried 'msoSnapToGrid' etc etc.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default switch on 'snap to' from vba

I knew it was done through the CommandBars object, but it's so far down in the menu tree that it took some digging to find ...

Set cb = CommandBars("Drawing").Controls(1).CommandBar.Cont rols(5)_
.CommandBar.Controls(1)
if Not (cb.State = msoButtonDown) Then cb.Execute

Tom Lavedas
===========


"jngi" wrote:

Does anyone out there know how to switch on the 'snap to grid' - drawing tools - using VBA? When I record a macro no code appears for this. I've tried 'msoSnapToGrid' etc etc.

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 doesn't the snap feature work in Excel? Pop5 Excel Discussion (Misc queries) 2 March 2nd 10 06:59 PM
Arrows don't snap vertical or horizontal FRB Charts and Charting in Excel 4 June 3rd 09 03:49 PM
A table gets updated every day, I want to take a snap shot of each TClawson Excel Discussion (Misc queries) 1 January 21st 09 07:13 PM
Excel Snap to Grid Feature kedar Excel Discussion (Misc queries) 1 October 20th 07 08:12 AM
Very interesting problem that should be a snap to figure out! KenRamoska Excel Discussion (Misc queries) 3 March 15th 06 08:38 PM


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

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"