Range Acting Lke Control?

P

Phil Hageman

Range C12:Z16 is merged, with typed text. Is it possible
to make this merged range operate the same as a forms
control button, such that if clicked on, the user is taken
to worksheet "Customer", Screen is sized (Zoom) to 62,
Cell "A1" selected? A forms control button is very
unsightly, and somewhat confusing - there are other
buttons working on the same screen.

Would the range, and text in the range, be created by code?
 
H

Harald Staff

Hi

I suggest you make a hyperlink of the text (insert menu). Use the workbook
even
Workbook_SheetFollowHyperlink
if you need additional code running (like zoom)
 
J

Jim Rech

You might consider adding a shape to the cell, perhaps a rectangle from the
Drawing toolbar. It can be formatted in many ways, and assigned a macro.
 
D

Dave Ramage

Add this tot he worksheet module of the required worksheet
(right-clcik the worksheet tab an select View Code)

Private Sub Worksheet_SelectionChange( _
ByVal Target As Range)
If Target.Address = "$C$12:$Z$16" Then
Sheets("Customer").Activate
Sheets("Customer").Range("a1").Select
ActiveWindow.Zoom = 62
End If
End Sub

Note that this code will run every time the selection
changes on the worksheet, though this shouldn't slow
things down by any perceivable amount...

Cheers,
Dave
 
P

Phil Hageman

Good question - I tried this, but I need a particular
screen zoom and cell selection for an on-screen
presentation. Can I make the hyperlink zoom?
 
P

Phil Hageman

I'm not familiar with this. How would I do it?
-----Original Message-----
Hi

I suggest you make a hyperlink of the text (insert menu). Use the workbook
even
Workbook_SheetFollowHyperlink
if you need additional code running (like zoom)

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Phil Hageman" <[email protected]> skrev i melding
code?


.
 
H

Harald Staff

Phil Hageman said:
I'm not familiar with this. How would I do it?

Open the ThisWorkbook module. Paste this in:

Private Sub Workbook_SheetFollowHyperlink(ByVal _
Sh As Object, ByVal Target As Hyperlink)
MsgBox Target.Name
End Sub


Test it. Once you know the prompted Target.Name, say "Go here", rewrite the
code to

Private Sub Workbook_SheetFollowHyperlink(ByVal _
Sh As Object, ByVal Target As Hyperlink)
If Target.Name = "Go here" Then
ActiveWindow.Zoom = 60
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top