PDA

View Full Version : Converting a Column Reference/Address to Points measurement for Shape alignment.



Neoday402
01-13-2007, 06:32 AM
Does anyone know how to convert a Column reference or Cell address from the R1C1 or column row number to Points so that we can use the AddShape method to draw a rectangel with the Left coordinate aligned to the Left border of a particular cell and the Width of the shape to span across a number of cells and end on the Right border of another cell?

JonPeltier
01-13-2007, 09:47 AM
A range has the familiar .Top, .Left, .Height, and .Width properties:

ActiveSheet.Range("C4:J20").Top
ActiveSheet.Range("C4":J20).Left
ActiveSheet.Range("C4:J20").Height
ActiveSheet.Range("C4:J20").Width