Нашел ответ сам
| Код |
|---|
Sub НомерСтрокиСтолбцаДляКнопки() 'Dim ButtonText As String 'ButtonText = Application.Caller 'MsgBox "Название кнопки " & ButtonText Dim b As Object Dim cs, rs As Integer Set b = ActiveSheet.Buttons(Application.Caller) With b.TopLeftCell rs = .Row cs = .Column End With MsgBox "Row Number " & rs & " Column Number " & cs 'далее необходимые действия со строкой и столбцом ' Cells(rs + 5, cs).Select End Sub |
Изменено: - 21.12.2022 21:50:52