If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Hyperlink a cell to run a module

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-22-11, 10:50
scrtchmstj scrtchmstj is offline
Registered User
 
Join Date: Jan 2009
Location: Louisiana, United States
Posts: 138
Hyperlink a cell to run a module

I have a module that when run triggers my physical phone to call a number through our OAISYS phone system. What I would like to do is have a spreadsheet with names in one column and extensions or phone numbers in another column. Then when I click on the hyperlinked name of that person, it runs the module calling the number in the row corresponding with the hyperlinked name.

Is it possible to have a cell hyperlinked to run VBA code? I've never done this before.

Thanks,
Joshua
Reply With Quote
  #2 (permalink)  
Old 04-27-11, 13:05
scrtchmstj scrtchmstj is offline
Registered User
 
Join Date: Jan 2009
Location: Louisiana, United States
Posts: 138
Is there no way to have a hyperlink run a module?
Reply With Quote
  #3 (permalink)  
Old 04-27-11, 17:52
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
Yes you can. When you click on a hyperlink it raises the worksheet's FollowHyperlink event, so you can use the Worksheet_FollowHyperlink() event handler to do this.
__________________
Colin

RAD Excel Blog

Other tutorials:
Array Formulas | Deleting Rows with VBA
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On