Estou tentando criar um quadro flutuante no Excel mas não consigo, copiei 2 cod VBA na internet (Youtube) e nenhum dos dois funcionou mas encontrei um problema, acredito que seja o problema que estou tendo é na criação do modulo onde não consigo selecionar a opção "Worksheet", ele mostra apenas o "Geral". Os cods que eu usei pra tentar criar o quadro flutuante são estes
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo Sair
Dim lRng As Range
Set lRng = Selection
Application.ScreenUpdating = False
Application.EnableEvents = False
lsMover
lRng.Select
Sair:
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub lsMover()
ActiveSheet.Shapes("Quadro").Select
Selection.Cut
Cells(ActiveWindow.ScrollRow + 1, 11).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim lgLin As Long, shFIGURE As Object
Set shFIGURE = ActiveSheet.Shapes("Quadro")
With ActiveWindow.VisibleRange
lgLin = .Row + .Rows.Count - 12 'Quantidade de celulas do rodape até a imagem
End With
With shFIGURE
shFIGURE.Top = shFIGURE.Top + (lgLin - .BottomRightCell.Row) * .BottomRightCell.RowHeight
End With
End Sub