Chào các bạn,
tôi có 1 file excel, trên đó có các commandbutton, tôi muốn lấy vị trí của commandbutton này nó thuộc dòng mấy, cột mấy
nhờ các bạn giúp đỡ
cám ơn
Function ShapeRangeAddress(ByVal shtName As String, ByVal shpName As String) As String
Dim shp As Shape
On Error Resume Next
Application.Volatile
With Sheets(shtName)
Set shp = .Shapes(shpName)
ShapeRangeAddress = Range(shp.TopLeftCell, shp.BottomRightCell).Address(0, 0)
End With
End Function