message bubble to appear...

ryklim

New Member
Joined
Feb 21, 2008
Messages
4
Hi,

I'm doing up an organisational chart, and would like to have a "bubble" appear next to a position within the chart, when the cursor hovers over the position's (text)box in the chart. Or, when the position box is clicked on. I'm thinking it's much like adding a 'comments box' to the text box.

Is this possible?

Tks.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi ryklim,

If you're using a textbox on a form or worksheet, you should be able to use the textbox's mousemove event, like so:
Code:
Private Sub TextBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    MsgBox "hello!"
End Sub
 
Upvote 0
Thanks, Paul.

I've copied the code you provided into Sheet1 (where the textbox resides), and changed the code to refer to (the correct) Textbox19. But, nothing happens when I hover over or click.

The macros are enabled in the spreadsheet.

Am I missing something?
 
Upvote 0
Works fine for me in a test workbook I put together.
Are you using a textbox from the Controls Toolbox?

Code is different if you use a Drawing Toolbar Textbox.
 
Upvote 0
Ah! that's the issue...
I'm using a textbox from the drawing toolbar, not from controls.

What code should I use then?
 
Upvote 0
Ryklim,

1. Press ALT+F11 to open the Visual Basic Editor
2. Click the Insert menu, select Module
3. Paste a macro, like the one below, into the blank module window
Code:
Sub Textbox1_Click()
    MsgBox "Hello"
End Sub
4. Close the VB Editor window.
5. Right-click on the border of the Drawing textbox and select 'Assign Macro'
6. Select the Textbox1_Click macro and click OK.

Now, when you click on the textbox it will display your pop-up message. Of course, you won't be able to click on the textbox to edit it's contents after that. You can, however, right-click on the textbox and select 'Edit Text' instead.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,763
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top