Vai al contenuto principale

Come aggiungere il mouse sulla punta a una determinata forma in Excel?

In molti casi, è necessario assegnare una macro a una determinata forma in modo da eseguire la macro facendo clic su di essa nel foglio di lavoro. Dopo aver assegnato la macro alla forma, aggiungere il mouse sulla punta può aiutarti a ricordare cosa farà la forma in futuro. Questo articolo mostra due metodi per aggiungere il puntatore del mouse a una determinata forma in Excel.

Aggiungi il puntatore del mouse a una determinata forma aggiungendo un collegamento ipertestuale
Aggiungi la punta del mouse a una determinata forma con il codice VBA


Aggiungi il puntatore del mouse a una determinata forma aggiungendo un collegamento ipertestuale

È possibile aggiungere un collegamento ipertestuale con la descrizione comando a una determinata forma nel foglio di lavoro. Si prega di fare quanto segue.

1. Fare clic con il pulsante destro del mouse sulla forma da aggiungere alla punta del mouse, quindi fare clic collegamento ipertestuale dal menu di scelta rapida. Vedi screenshot:

2. Nel Inserisci collegamento ipertestuale finestra di dialogo, fare clic su ScreenTip pulsante. E nel Imposta descrizione comando collegamento ipertestuale finestra di dialogo, immettere il testo del suggerimento sullo schermo che è necessario visualizzare mentre si passa con il mouse sulla forma. Infine fare clic su OK pulsante. Vedi screenshot:

3. Quando ritorna al file Inserisci collegamento ipertestuale finestra di dialogo, fare clic su Segnalibro pulsante. Quindi inserisci A1 nel Tipo nella casella di riferimento della cella di Seleziona Inserisci nel documento finestra di dialogo e infine fare clic su OK pulsante.

4. Fare clic sul OK nel pulsante Inserisci collegamento ipertestuale finestra di dialogo per terminare la creazione del collegamento ipertestuale.

Ora puoi vedere il suggerimento sullo schermo visualizzato quando passi con il mouse sulla forma.


Aggiungi la punta del mouse a una determinata forma con il codice VBA

Puoi facilmente aggiungere il mouse sulla punta a una determinata forma dopo aver eseguito il seguente codice VBA.

1. Aprire il foglio di lavoro che contiene la forma che verrà visualizzata suggerimento quando si sposta il mouse. Fare clic con il pulsante destro del mouse sulla scheda del foglio e quindi fare clic su Visualizza codice dal menu di scelta rapida.

2. Nel Microsoft Visual Basic, Applications Edition finestra, copia il codice VBA sottostante nella finestra del codice.

Codice VBA 1: aggiungi il mouse sulla punta a una determinata 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. Clic inserire > Moduli. Quindi inserisci sotto il codice VBA nella finestra del modulo.

Codice VBA 2: aggiungi il mouse sulla punta a una determinata 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

Note:

1). Si prega di sostituire il "Fare clic per eseguire Macro" e "Rettangolo 4"Con il testo del suggerimento sullo schermo e il nome di una determinata forma.
2). Sostituisci "Sposta riga" in linea "Chiama MoveRow"al nome della macro che hai assegnato alla forma

3. premi il F5 chiave per eseguire il codice. Quindi il suggerimento per lo schermo specificato viene aggiunto immediatamente alla determinata forma.


Articoli correlati:

I migliori strumenti per la produttività in ufficio

🤖 Assistente AI di Kutools: Rivoluziona l'analisi dei dati basandosi su: Esecuzione intelligente   |  Genera codice  |  Crea formule personalizzate  |  Analizzare i dati e generare grafici  |  Richiama le funzioni di Kutools...
Funzioni popolari: Trova, evidenzia o identifica i duplicati   |  Elimina righe vuote   |  Combina colonne o celle senza perdere dati   |   Round senza formula ...
Super ricerca: VLookup a criteri multipli    VLookup a valori multipli  |   VLookup su più fogli   |   Ricerca fuzzy ....
Elenco a discesa avanzato: Crea rapidamente un elenco a discesa   |  Elenco a discesa dipendente   |  Elenco a discesa a selezione multipla ....
Gestore di colonna: Aggiungi un numero specifico di colonne  |  Sposta colonne  |  Attiva/disattiva lo stato di visibilità delle colonne nascoste  |  Confronta intervalli e colonne ...
Funzionalità in primo piano: Messa a fuoco della griglia   |  Vista di progettazione   |   Grande barra delle formule    Gestore di cartelle di lavoro e fogli   |  Resource Library (Testo automatico)   |  Date picker   |  Combina fogli di lavoro   |  Crittografa/decrittografa le celle    Invia e-mail per elenco   |  Super filtro   |   Filtro speciale (filtro grassetto/corsivo/barrato...) ...
I 15 migliori set di strumenti12 Testo Strumenti (aggiungi testo, Rimuovi personaggi, ...)   |   50+ Grafico Tipi (Diagramma di Gantt, ...)   |   40+ Pratico Formule (Calcola l'età in base al compleanno, ...)   |   19 Inserimento Strumenti (Inserisci il codice QR, Inserisci immagine dal percorso, ...)   |   12 Conversione Strumenti (Numeri in parole, Conversione di valuta, ...)   |   7 Unisci e dividi Strumenti (Combina righe avanzate, Celle divise, ...)   |   ... e altro ancora

Potenzia le tue competenze di Excel con Kutools per Excel e sperimenta l'efficienza come mai prima d'ora. Kutools per Excel offre oltre 300 funzionalità avanzate per aumentare la produttività e risparmiare tempo.  Fai clic qui per ottenere la funzionalità di cui hai più bisogno...

Descrizione


Office Tab porta l'interfaccia a schede in Office e semplifica notevolmente il tuo lavoro

  • Abilita la modifica e la lettura a schede in Word, Excel, PowerPoint, Publisher, Access, Visio e Project.
  • Apri e crea più documenti in nuove schede della stessa finestra, piuttosto che in nuove finestre.
  • Aumenta la produttività del 50% e riduce ogni giorno centinaia di clic del mouse!
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