Follow hyperlink to show form

O

omsoft

I have the following code to add hyperlink to a cell.

Range("A" & i).Hyperlinks.Add Anchor:=Cells(i, 1), _
Address:="", TextToDisplay:=rs("RuleID").Value

Then in that same worksheet, i have the following code to show the form to
modify that rule.

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)

frmRuleModify.cmbRuleId.Value = Target.Range.Value
frmRuleModify.Show

End Sub

The problem is that, this worksheet which contains a set of rules found
based on specified criteria get deleted and recreated, each time a query is
done. Is there a way I can put the above code to follow hyperlink in a
module, so it does not get deleted each time?

Thanks.
 

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