Ir para o conteúdo principal

Como adicionar a ponta do mouse sobre uma determinada forma no Excel?

Em muitos casos, você precisa atribuir a macro a uma determinada forma para executá-la clicando nela em sua planilha. Depois de atribuir macro à forma, adicionar o mouse sobre a ponta pode ajudar a lembrá-lo do que a forma fará em uso futuro. Este artigo mostra dois métodos para adicionar a ponta do mouse sobre uma determinada forma no Excel.

Adicione o mouse sobre a ponta a uma determinada forma adicionando um hiperlink
Adicione a ponta do mouse sobre uma determinada forma com o código VBA


Adicione o mouse sobre a ponta a uma determinada forma adicionando um hiperlink

Você pode adicionar um hiperlink com a dica de tela a uma determinada forma na planilha. Faça o seguinte.

1. Clique com o botão direito do mouse na forma desejada para adicionar o mouse sobre a ponta e, em seguida, clique Hyperlink no menu do botão direito. Veja a imagem:

2. No Insira o hyperlink caixa de diálogo, clique no botão Dica de tela botão. E no Definir Dica de Tela de Hiperlink caixa de diálogo, insira o texto de dica de tela que você precisa exibir enquanto passa o mouse sobre a forma. Por fim, clique no OK botão. Veja a imagem:

3. Quando ele retorna ao Insira o hyperlink caixa de diálogo, clique no botão Bookmark botão. Em seguida, insira A1 em Tipo na caixa de referência de célula do Selecionar lugar no documento caixa de diálogo e, finalmente, clique no OK botão.

4. Clique na OK botão no Insira o hyperlink caixa de diálogo para concluir a criação do hiperlink.

Agora você pode ver a dica de tela exibida ao passar o mouse sobre a forma.


Adicione a ponta do mouse sobre uma determinada forma com o código VBA

Você pode adicionar facilmente o mouse sobre a ponta a uma determinada forma após executar o seguinte código VBA.

1. Abra a planilha que contém a forma que você exibirá como dica ao mover o mouse sobre ela. Clique com o botão direito na guia da planilha e clique em Exibir código no menu de contexto.

2. No Microsoft Visual Basic para Aplicações janela, copie o código VBA abaixo para a janela de código.

Código VBA 1: Adicione o mouse sobre a ponta a uma determinada forma

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Updated by Extendoffice 2018/3/30
    If Target.Address = Range("A1").Address Then
        Call MoveRow
    End If
End Sub

3. Clique inserção > Módulo. Em seguida, insira o código VBA abaixo na janela Módulo.

Código VBA 2: Adicione o mouse sobre a ponta a uma determinada forma

Sub Text()
'Updated by Extendoffice 2018/3/30
    Dim xShape As Shape
    Dim xRg As Range
    On Error Resume Next
    Application.EnableEvents = False
    Set xShape = ActiveSheet.Shapes("Rectangle 4")
    If Not xShape Is Nothing Then
        ActiveSheet.Hyperlinks.Add xShape, "", "A1", ScreenTip:="Click to run Macro "
    End If
    If ActiveSheet.Hyperlinks(1).SubAddress = "A1" Then
        Call MoveRow
    End If
    Application.EnableEvents = True
End Sub

Notas:

1). Substitua o “Clique para executar a macro"E"Retângulo 4”Com seu texto de dica de tela e o nome de determinada forma.
2). Substitua "MoveRow" na linha "Chamar MoveRow"ao nome da macro que você atribuiu à forma

3. aperte o F5 chave para executar o código. Em seguida, a dica de tela especificada é adicionada à forma certa imediatamente.


Artigos relacionados:

Melhores ferramentas de produtividade de escritório

🤖 Assistente de IA do Kutools: Revolucionar a análise de dados com base em: Execução Inteligente   |  Gerar Código  |  Crie fórmulas personalizadas  |  Analise dados e gere gráficos  |  Invocar funções do Kutools...
Recursos mais comuns: Encontre, destaque ou identifique duplicatas   |  Excluir linhas em branco   |  Combine colunas ou células sem perder dados   |   Rodada sem Fórmula ...
Super pesquisa: VLookup de múltiplos critérios    VLookup de múltiplos valores  |   VLookup em várias planilhas   |   Pesquisa Difusa ....
Lista suspensa avançada: Crie rapidamente uma lista suspensa   |  Lista suspensa de dependentes   |  Lista suspensa de seleção múltipla ....
Gerenciador de colunas: Adicione um número específico de colunas  |  Mover colunas  |  Alternar status de visibilidade de colunas ocultas  |  Compare intervalos e colunas ...
Recursos em destaque: Foco da Grade   |  Vista de Design   |   Grande Barra de Fórmula    Gerenciador de pastas de trabalho e planilhas   |  Biblioteca (Auto texto)   |  Data Picker   |  Combinar planilhas   |  Criptografar/Descriptografar Células    Enviar e-mails por lista   |  Super Filtro   |   Filtro Especial (filtro negrito/itálico/tachado...) ...
15 principais conjuntos de ferramentas12 Texto Ferramentas (Adicionar texto, Remover Personagens, ...)   |   50+ de cores Tipos (Gráfico de Gantt, ...)   |   Mais de 40 práticos Fórmulas (Calcule a idade com base no aniversário, ...)   |   19 Inclusão Ferramentas (Insira o código QR, Inserir imagem do caminho, ...)   |   12 Conversão Ferramentas (Números para Palavras, Conversão de moedas, ...)   |   7 Unir e dividir Ferramentas (Combinar linhas avançadas, Dividir células, ...)   |   ... e mais

Aprimore suas habilidades de Excel com o Kutools para Excel e experimente uma eficiência como nunca antes. Kutools para Excel oferece mais de 300 recursos avançados para aumentar a produtividade e economizar tempo.  Clique aqui para obter o recurso que você mais precisa...

Descrição


Office Tab traz interface com guias para o Office e torna seu trabalho muito mais fácil

  • Habilite a edição e leitura com guias em Word, Excel, PowerPoint, Publisher, Access, Visio e Project.
  • Abra e crie vários documentos em novas guias da mesma janela, em vez de em novas janelas.
  • Aumenta sua produtividade em 50% e reduz centenas de cliques do mouse para você todos os dias!
Comments (8)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Convert your shape to an image. Images have tool tips.
This comment was minimized by the moderator on the site
Doesn't work..... if there is a hyperlink associated with the shape then the macro will not run....
This comment was minimized by the moderator on the site
Dear Niall,
Sorry for the mistake. Please try as below to solve the problem.

Step 1:
In the worksheet contains the shape you will display tip, right click the sheet tab and select View Code from the context menu. And then copy below VBA into the Code window:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("A1").Address Then
Call MoveRow
End If
End Sub

Step 2:
Open the Module code window, copy below code into the Module window.
Please change "MoveRow" in the line Call MoveRow to the macro name you assigned to the shape, and then press the F5 key to run the code.
Thank you for your comment.

Sub Text()
Dim xShape As Shape
Dim xRg As Range
On Error Resume Next
Application.EnableEvents = False
Set xShape = ActiveSheet.Shapes("Rectangle 1")
If Not xShape Is Nothing Then
ActiveSheet.Hyperlinks.Add xShape, "", "A1", ScreenTip:="Click to run Macro "
End If
If ActiveSheet.Hyperlinks(1).SubAddress = "A1" Then
Call MoveRow
End If
Application.EnableEvents = True
End Sub
This comment was minimized by the moderator on the site
Dear Niall,
The code works well in my case. Can you provide your Office version? Thank you for your comment.
This comment was minimized by the moderator on the site
Hello, Sub Test() On Error Resume Next Dim xShape As Shape Set xShape = ActiveSheet.Shapes("Rectangle 4") If Not xShape Is Nothing Then _ ActiveSheet.Hyperlinks.Add xShape, "", "", ScreenTip:="Click to run Macro " End Sub Thank code works great, but it removes Assigned macro. When i use Screen Tip and press on shape Macro Deosn't work. Is any way to fix that? Use Screen tip on shape and keep macro working? Thank youĄ
This comment was minimized by the moderator on the site
Dear Evaldas,
Sorry for the mistake. Please try as below to solve the problem.

Step 1:
In the worksheet contains the shape you will display tip, right click the sheet tab and select View Code from the context menu. And then copy below VBA into the Code window:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("A1").Address Then
Call MoveRow
End If
End Sub

Step 2:
Open the Module code window, copy below code into the Module window.
Please change "MoveRow" in the line Call MoveRow to the macro name you assigned to the shape, and then press the F5 key to run the code.
Thank you for your comment.

Sub Text()
Dim xShape As Shape
Dim xRg As Range
On Error Resume Next
Application.EnableEvents = False
Set xShape = ActiveSheet.Shapes("Rectangle 1")
If Not xShape Is Nothing Then
ActiveSheet.Hyperlinks.Add xShape, "", "A1", ScreenTip:="Click to run Macro "
End If
If ActiveSheet.Hyperlinks(1).SubAddress = "A1" Then
Call MoveRow
End If
Application.EnableEvents = True
End Sub
This comment was minimized by the moderator on the site
I wish someone would solve this problem.
This comment was minimized by the moderator on the site
Good Day,
Please try as below to solve the problem.

Step 1:
In the worksheet contains the shape you will display tip, right click the sheet tab and select View Code from the context menu. And then copy below VBA into the Code window:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("A1").Address Then
Call MoveRow
End If
End Sub

Step 2:
Open the Module code window, copy below code into the Module window.
Please change "MoveRow" in the line Call MoveRow to the macro name you assigned to the shape, and then press the F5 key to run the code.
Thank you for your comment.

Sub Text()
Dim xShape As Shape
Dim xRg As Range
On Error Resume Next
Application.EnableEvents = False
Set xShape = ActiveSheet.Shapes("Rectangle 1")
If Not xShape Is Nothing Then
ActiveSheet.Hyperlinks.Add xShape, "", "A1", ScreenTip:="Click to run Macro "
End If
If ActiveSheet.Hyperlinks(1).SubAddress = "A1" Then
Call MoveRow
End If
Application.EnableEvents = True
End Sub
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations