'计算Cmd1所在的坐标
Function GetRC(ByVal Cmd As CommandButton)
Dim i, rX, cY As Integer
For i = 1 To 255
If Cells(1, i).Left < Cmd.Left And Cells(1, i + 1).Left > Cmd.Left Then
cY = i: Exit For
End If
Next
For i = 1 To 65535
If Cells(i, 1).Top < Cmd.Top And Cells(i + 1, 1).Top > Cmd.Top Then
rX = i: Exit For
End If
Next
GetRC = "Row:" & rX & ";Column:" & cY
End Function