excel positioning in points for autoshapes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i want to know how to determine where (in Points) to position an autoshape
using vba (without recording a macro).
aparently shapes lines etc use a point system to position themselves using
start x axis, start y axis, end x asis and end y axis.

1. is it possible to view how many point there in in relation to a cell
reference, and
2. is it even possible to figure out the point system without recording a
macro???
 
thanks for the advice... but im not wanting to know the points for a web page
im only wanting to know the points for excel, and how you would figure it out
what point measurement you'd need for a perticular section in excel, ie some
form of ruler etc ... is there such a thing??
 
Try keying off of cell top and left properties or column left and row top
properties respectively:-

Sub Test()
Dim T, L
With Range("J10")
L = .Left
T = .Top
End With
With ActiveSheet.Shapes(1)
.Top = T
.Left = L
End With
MsgBox "Shape moved to top-left corner of cell J10"
With Columns(5)
L = .Left + .Width / 2
End With
With Rows(12)
T = .Top + .Height / 2
End With
With ActiveSheet.Shapes(1)
.Top = T
.Left = L
End With
MsgBox "Shape now moved to center of cell E12"
End Sub

Regards,
Greg
 
I guess the short answer is no, there is no ruler as such. The distances can
be measured in pixels per inch, but even that varies from one product to
another i.e. 72 ppi, 96 ppi, etc. The best solution I can think of is trial
and error using the references of Top and Left with pixels until you find
what your screen measurements are for ppi. Then you can use that as your
guideline for placing shapes. It might be an optical illusion, but it seems
that on my monitor the same number of pixels are shorter from top to bottom
than from side to side. Good Luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top