Hyperlink coding?

  • Thread starter Thread starter Phil Hageman
  • Start date Start date
P

Phil Hageman

The Sub below, assigned to a form control button,
correctly opens the "Customer" worksheet and sizes the
screen to 61%. I have some hyperlinks that also take
users to "Customer"; however, there is no screen sizing
involved. Is there a way to add code to a hyperlink
similar the below?

Sub GoToCustomer()
Application.ScreenUpdating = False
Sheets("Customer").Select
Range("A1").Select
ActiveWindow.Zoom = 61
Application.ScreenUpdating = True
End Sub
 
If you have excel 2000 or above, you can use the followhyperlink event.

You wouldn't put in the code to change the worksheet, as that would be done
by the hyperlink.
 
Also, you might want to look at the worksheet_activate event. Perhaps do
the zooming there. I don't recall if this fires when a hyperlink activates
the page, but would be easy to test.
 
Back
Top