Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hyperlink to a userform?
I have a macro that assembles a series of user workbooks from a template
library, and some cells have hyperlinks that are constructed based on user data entries. I now have a need to give the user a choice of hyperlink from certain cells, and my plan is to provide a userform to handle that. Is it possible to create a hyperlink to the userform, or do I have to emulate it by using a selection change event? -- Al C |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hyperlink to a userform?
This should work. just change cell reference to the cell that has your
hyperlink Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) If Not Intersect(Target.Parent, Range("c9")) Is Nothing Then MySub 'sub to open userform or just userform.show End If End Sub "Al" wrote: I have a macro that assembles a series of user workbooks from a template library, and some cells have hyperlinks that are constructed based on user data entries. I now have a need to give the user a choice of hyperlink from certain cells, and my plan is to provide a userform to handle that. Is it possible to create a hyperlink to the userform, or do I have to emulate it by using a selection change event? -- Al C |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hyperlink to a userform?
Yes. That would work if I could enter the code by hand, but I need to have
the macro create the links dynamically after the user enters data, and I can't know in advance even which cells need the multiple links. I can have the macro set up a range and populate it with the appropriate hyperlink names, link the controls to those names, adjust the userform so only the live controls are accessable, and access the userform through the event handler, but I'm looking to see if there is an easier way to get there. -- Al C "JNW" wrote: This should work. just change cell reference to the cell that has your hyperlink Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) If Not Intersect(Target.Parent, Range("c9")) Is Nothing Then MySub 'sub to open userform or just userform.show End If End Sub "Al" wrote: I have a macro that assembles a series of user workbooks from a template library, and some cells have hyperlinks that are constructed based on user data entries. I now have a need to give the user a choice of hyperlink from certain cells, and my plan is to provide a userform to handle that. Is it possible to create a hyperlink to the userform, or do I have to emulate it by using a selection change event? -- Al C |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hyperlink from Userform | Excel Discussion (Misc queries) | |||
Hyperlink within Textbox(UserForm) | Excel Programming | |||
userform hyperlink question | Excel Programming | |||
QN: Webpage Hyperlink in a UserForm?? | Excel Programming | |||
Userform and Cell Email Hyperlink | Excel Programming |