October 2007

UK Excel user conference and Excel developer conference

This years Excel user conference is to be held in sunny Cambridge. New for this year is a Developer day, which looks like it could be good fun although I’m not sure of the pricing for that day Simon? Damon?

Simon, such that he is, is taking suggestions for topics, although what he had suggested looks about right to me. But if you have any ideas then I’m sure he’d like to hear them!

Miss(ed) Shapes?

Over at JMT there was a strange question asked. How do you get the cells that a drawn shape lies over? I’m was amazed to see that there were methods in the OM to get this, heres some example code

[vba]
Sub MShapesLocation()
”Code by Ross McLean – Methods In Excel
”Tells you the top left and bottom right cells
”www.blog.methodsinexcel.co.uk
”Use freely and at you own risk!
”Warning – this clearly give the rect of the shap not what the
”actuall shape looks like on scree!

Dim sh As Excel.Shape
Dim sText As String

sText = “Here are the shape details for the active workbook: ” & vbNewLine

For Each sh In ActiveSheet.Shapes
With sh
sText = sText & sh.Name & “: (” & _
.TopLeftCell.Cells.Row & “,” & .TopLeftCell.Cells.Column & “),(” & .BottomRightCell.Cells.Row & “,” & .BottomRightCell.Cells.Column & “)” & vbNewLine

End With
Next

MsgBox sText, vbOKOnly, “Methods In Excel”

End Sub
[/vba]

I ran this and got the following answer:

ShapesLocation.PNG

As you can see this is not quite what you would expect, it’s kinda drawing a rectangle – well this is windows!