Snap to Grid from VBA

shlick

New Member
Joined
Aug 20, 2010
Messages
1
I'm using Excel 2007 and couldn't find a way to keep the setting of
"Drawing Tools - Format - Align - Snap to Grid",
as when the file opens it's disabled again.

Tried also to find a way of using VBA to put something into ThisWorkbook code or into Worksheet_Activate() function, so it will be activated on the startup, but the examples were for XL2003 with CommandBar, not sure how to convert it to XL2007.

Actually all I need is to have the two vertical lines, Shapes in Sheet1, to have the feature of Snap-to-Grid to be On, instead of manually doing it on opening the file (even if I added a button on the Quick Access Toolbar, QAT for that).

Thanks in advance.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,213,565
Messages
6,114,338
Members
448,570
Latest member
rik81h

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top