Public Sub Test(ByVal control As Office.IRibbonControl)
Dim Epp As Excel.Application
Epp = Globals.ThisAddIn.Application
Dim rg As Excel.Range, a As Excel.Shape, k1 As Int16, k2 As Int16
'On Error Resume Next
a = Epp.Selection
'为什么运行到这里A的值是nothing?
a.Left = a.TopLeftCell.Offset(1, 0).Left + (a.TopLeftCell.Offset(1, 0).Width - a.Width) / 2
a.Top = a.TopLeftCell.Offset(1, 0).Top + (a.TopLeftCell.Offset(1, 0).Height - a.Height) / 2
End Sub