MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

hyperlink to a VBA macro, on an Excel sheet

  Asked By: Sean    Date: Sep 24    Category: MS Office    Views: 3948

Is it possible to do that ?
Is it possible to write an URL that points to a VBA code within an
Excel workbook ?



1 Answer Found

Answer #1    Answered By: Ora Hanson     Answered On: Sep 24

I tricked it somewhat but it works: the trick is to use the sub
address to go to a specific cell. That cell is monitored with the
Worksheet_SelectionChange event. And in that event your procedure or
function is called.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Address
Case "$C$1"
Call SomeProc
Case "$C$2"
Call SomeProc2
End Select
End Sub

I did make a sample file, I shall upload HyperlinkRunProc.xls.

Didn't find what you were looking for? Find more on hyperlink to a VBA macro, on an Excel sheet Or get search suggestion and latest updates.