Vb标签窗体控件数组,如何返回被点击的控件所在单元格的位置?
SubCommand1()DimshpAsShapeForEachshpInActiveSheet.Shapesirow1=shp.TopLelfCell.Rowicol...
Sub Command1()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
irow1 = shp.TopLelfCell.Row
icol1 = shp.TopLelfCell.Column
Cells(irow1,icol1).Select
Next
End Sub
这段代码控件都返回同一个单元格,而不是各自控件所在单元格,求指教 展开
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
irow1 = shp.TopLelfCell.Row
icol1 = shp.TopLelfCell.Column
Cells(irow1,icol1).Select
Next
End Sub
这段代码控件都返回同一个单元格,而不是各自控件所在单元格,求指教 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询