View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default How can I align pictures to the columns in code

Try this (changing the worksheet name and picture shape name references to
what you are using in your code)...

With Worksheets("Sheet1").Shapes("Picture 1")
.Left = Range("B:B").Left
.Width = Range("B:B").Width
End With

--
Rick (MVP - Excel)


"Michelle" wrote in message
...
Hello, I want to bring in pictures and align and size them so that they
sit exactly between the borders of the B column

The left side of my shape should end up on the border between A and B and
the right side, on the border between B and C

Does that make sense?

The columns in the sheet may be different sizes so I'll need to include a
way of locating the left and right before positioning the picture. I can't
assume they'll always be the same.

Is this possible

Many thanks

M