ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   TextBox Attached to AutoShape (https://www.excelbanter.com/excel-programming/357014-textbox-attached-autoshape.html)

Phil H[_2_]

TextBox Attached to AutoShape
 
Using Excel 2003

I have an object (and AutoShape) with the following macro attached to it,
used to take the user to another worksheet. The user clicks on the object
and the code moves then as directed.

Sub GoToTFMWorksheetPage1()
Application.ScreenUpdating = False
Sheets("TFM Worksheet Page 1").Select
Application.Goto Reference:=Range("A1"), Scroll:=True
Application.Goto Reference:=Range("B100"), Scroll:=False
ActiveWindow.Zoom = 100
Application.ScreenUpdating = True
End Sub

In addition, I need the user to be able to read a text message, similar to a
hyperlink message, telling him the title of the worksheet they are about to
go to. For example, when the user puts the cursor over the object, the
cursor context changes to the pointing finger. I want to have a Text Box
come up at that time. If the user clicks on the object, they will go to the
worksheet.

The technique used to do this would be used multiple times throughout the
worksheets in the workbook.

Would I add code to the above? What would the code be?


[email protected]

TextBox Attached to AutoShape
 
Click on your object while in DesignMode to prevent the Macro running
then goto Insert Hyperlink
Select Place In This Document (left hand side) and add a screen tip
(top right).
You may then need to put code into the worksheet_activate() sub

Private Sub Worksheet_Activate()
ActiveWindow.Zoom = 100
End Sub


Tom Ogilvy

TextBox Attached to AutoShape
 
You could just assign a hyperlink to the autoshape. Right click on it and
select hyperlinks. Then if you hover your mouse over the shape, you get a
tool tip with the link. You can also probably right click on it and edit
text to put a label that has the sheet name.

It looks like you don't want to have the selection visible. You might be
able to use the follow hyperlink event to achieve that part.

--
Regards,
Tom Ogilvy


"Phil H" wrote:

Using Excel 2003

I have an object (and AutoShape) with the following macro attached to it,
used to take the user to another worksheet. The user clicks on the object
and the code moves then as directed.

Sub GoToTFMWorksheetPage1()
Application.ScreenUpdating = False
Sheets("TFM Worksheet Page 1").Select
Application.Goto Reference:=Range("A1"), Scroll:=True
Application.Goto Reference:=Range("B100"), Scroll:=False
ActiveWindow.Zoom = 100
Application.ScreenUpdating = True
End Sub

In addition, I need the user to be able to read a text message, similar to a
hyperlink message, telling him the title of the worksheet they are about to
go to. For example, when the user puts the cursor over the object, the
cursor context changes to the pointing finger. I want to have a Text Box
come up at that time. If the user clicks on the object, they will go to the
worksheet.

The technique used to do this would be used multiple times throughout the
worksheets in the workbook.

Would I add code to the above? What would the code be?


Phil H[_2_]

TextBox Attached to AutoShape
 
Thanks Tom, this works exactly as needed. Unknown to me, the code acts
before any hyperlink instruction. I entered the exact "hover" text as a
screen tip. Very clean!

Thanks Phil

"Tom Ogilvy" wrote:

You could just assign a hyperlink to the autoshape. Right click on it and
select hyperlinks. Then if you hover your mouse over the shape, you get a
tool tip with the link. You can also probably right click on it and edit
text to put a label that has the sheet name.

It looks like you don't want to have the selection visible. You might be
able to use the follow hyperlink event to achieve that part.

--
Regards,
Tom Ogilvy


"Phil H" wrote:

Using Excel 2003

I have an object (and AutoShape) with the following macro attached to it,
used to take the user to another worksheet. The user clicks on the object
and the code moves then as directed.

Sub GoToTFMWorksheetPage1()
Application.ScreenUpdating = False
Sheets("TFM Worksheet Page 1").Select
Application.Goto Reference:=Range("A1"), Scroll:=True
Application.Goto Reference:=Range("B100"), Scroll:=False
ActiveWindow.Zoom = 100
Application.ScreenUpdating = True
End Sub

In addition, I need the user to be able to read a text message, similar to a
hyperlink message, telling him the title of the worksheet they are about to
go to. For example, when the user puts the cursor over the object, the
cursor context changes to the pointing finger. I want to have a Text Box
come up at that time. If the user clicks on the object, they will go to the
worksheet.

The technique used to do this would be used multiple times throughout the
worksheets in the workbook.

Would I add code to the above? What would the code be?



All times are GMT +1. The time now is 03:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com