Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Excel: Opening hyperlinks without using mouse

Status
Not open for further replies.

s0ccerdude

Technical User
Jul 2, 2003
38
US
I have a spreadsheet with a column of hyperlinks. I want to proceed down this column by opening each hyperlink one at a time.

(note: I want to activate the hyperlink, copy data from the page that the browser opens, close the browser, paste the copied data into a separate spreadsheet, return to the original spreadsheet with the column of hyperlinks, and repeat...)

Is there a way to change the settings in Excel (Office 2003 version) so that I can open the hyperlinks by navigating to the cell with the keyboard (i.e. down-arrow button) and then clicking "Enter"? The current settings require me to left-click with the mouse in order to open a hyperlink. This is proving to be a huge pain in the a$$!

Any help would be much appreciated!
 
You could probably do this with VBA.

I'd recommend re-posting this in Forum707 where you'll be able to get more indepth help.

Cheers,
Dave

Probably the only Test Analyst Manager on Tek-Tips...therefore whatever it was that went wrong, I'm to blame...

animadverto vos in Abyssus!

Take a look at Forum1393!
 
Hi s0ccerdude,

AFAIK there's no way to change the setting but you can follow the hyperlink just using the keyboard ...

With the cell containing the hyperlink selected ..
Press EITHER Shift+F10 OR the 'context menu' key (I don't know its proper name but on my keyboard it is between the right Windows key and the right Ctrl key and has an icon that looks like a popup menu)
THEN Press O to Open the hyperlink

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
The vba approach....

'In the "private module for the worksheet in question"...

Private Sub Worksheet_Activate()
Application.MoveAfterReturn = False
Application.OnKey Chr$(13), "Key_Action"
End Sub

Private Sub Worksheet_Deactivate()
Application.OnKey Chr$(13)
Application.MoveAfterReturn = True
End Sub

'In a public module...

Sub Key_Action()
If ActiveCell.Hyperlinks.Count > 0 Then
ActiveCell.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Else
End If
End Sub
 
'This version of the Key_Action code will move down 1 cell if there is no valid hyperlink an link to url if there is a valid hyperlink.

Sub Key_Action_on()
If ActiveCell.Hyperlinks.Count > 0 Then
ActiveCell.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Else
Cells(ActiveCell.Row + 1, ActiveCell.Column).Select
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top