Snap an object to a cell border via macro
Hi Dave Thankyou for that, it gave me the key to unlock the door!. Sorry
about delayed response but I can't see any of the content of the answers on
my computer now when I go to this site. I can only see that I have posted a
question and that there is an answer. Maybe you have an idea on that?
Microsoft hasn't responded to my email either. Thanks again, Brett
"Dave Peterson" wrote:
Just in case you have trouble:
With ActiveSheet.Shapes("Text Box 1")
.Left = .Parent.Range("A1").Left
.Top = .Parent.Range("A1").Top
.Width = .Parent.Range("a1").Width
.Height = .Parent.Range("a1").Height
End With
I like to qualify my ranges, so I can use:
With worksheets("sheet9999").Shapes("Text Box 1")
.Left = .Parent.Range("A1").Left
.Top = .Parent.Range("A1").Top
.Width = .Parent.Range("a1").Width
.Height = .Parent.Range("a1").Height
End With
Brettjg wrote:
Ok thanks, I'll research those properties.
"Greg Wilson" wrote:
Right and Bottom are properties that just aren't supported by the VBA Shapes
collection. Generally, Right and Bottom are achieved by adding the Width
property to the Left property and the Height property to the Top property
respectively.
Greg
"Brettjg" wrote:
Hi Greg, I was just fooling around with that and tried
.right = Range("A1").right
.bottom = Range("A1").bottom
(pretty obvious, really) and it debugs. When I typed the right in lower case
it auto-corrected it, so I thought that it might work, but it doesn't like
Right or Bottom it seems. Any clues?
Brett
"Greg Wilson" wrote:
Try:
With ActiveSheet.Shapes("Text Box 1")
.Left = Range("A1").Left
.Top = Range("A1").Top
End With
Greg
--
Dave Peterson
|