ExcelWhizzDotCom
New Member
- Joined
- Dec 31, 2015
- Messages
- 11
Hi all, can any VBA whizzes help me out?
I'm trying to programmatically maintain the position of autoshapes on my worksheet, one of the routines re-sizes column widths but I want to write into it something which remembers their position at the start of the routine and puts them back after the column widths are changed.
I've tried something simple:
And then at the end move it back -10000. But the problem is if overall widths have reduced, the -10000 step takes everything too far to the left.
If anyone has a solution it'd be gratefully received!
Thanks
CW
I'm trying to programmatically maintain the position of autoshapes on my worksheet, one of the routines re-sizes column widths but I want to write into it something which remembers their position at the start of the routine and puts them back after the column widths are changed.
I've tried something simple:
Code:
ActiveSheet.Shapes.SelectAll
Selection.ShapeRange.IncrementLeft 10000
And then at the end move it back -10000. But the problem is if overall widths have reduced, the -10000 step takes everything too far to the left.
If anyone has a solution it'd be gratefully received!
Thanks
CW