- 07 Out 2021 às 10:11
#67380
Bom dia
Option Explicit
Private Sub CommandButton1_Click()
Range("a1").Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal Targed As Excel.Range)
Dim effectiveBottomRow As long
Dim my Commandbutton1 As Object
Set myCommandButton1 = ActiveSheet.commandButton1:
With ActiveWindow.VisibleRange
Commandbutton1.Top = .Top + 0
Commandbutton1.Left = .Left + .Width - CommandButton1.Width - 7
End With
End Sub
Rodava normal, agora dá erro de compilação
Option Explicit
Private Sub CommandButton1_Click()
Range("a1").Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal Targed As Excel.Range)
Dim effectiveBottomRow As long
Dim my Commandbutton1 As Object
Set myCommandButton1 = ActiveSheet.commandButton1:
With ActiveWindow.VisibleRange
Commandbutton1.Top = .Top + 0
Commandbutton1.Left = .Left + .Width - CommandButton1.Width - 7
End With
End Sub
Rodava normal, agora dá erro de compilação