Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 17th, 2006, 10:20 AM
Authorized User
 
Join Date: Jun 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default hyperlink

Hi,
I have hyperlinks in a sheet in Excel, for example cell A6 is linked to A101, A7 is linked to A201, and so on (the number of such hyperlinks changes dynamically, so there isn't a fixed set). The links work fine, but what happens is that it takes focus to A101 at the BOTTOM of the excel screen. Is there any way that I could make the hyperlink take the "target" cell to the TOP row of the visible Excel window?
Thank you!
Kriti

 
Old July 22nd, 2006, 02:15 AM
Authorized User
 
Join Date: Jul 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default


Mayby it helps you

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim WIERSZ
Dim KOLUMNA
KOLUMNA = ActiveCell.Column
WIERSZ = ActiveCell.Row
If KOLUMNA = 1 And Cells(WIERSZ, 1) <> "" Then
ActiveWindow.ScrollRow = WIERSZ
End If
End Sub

 
Old July 24th, 2006, 12:27 AM
SMI SMI is offline
Authorized User
 
Join Date: Jul 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I guess you recently posted the same question and I posted the following code which was confirmed by you to have been found OK:

ActiveWindow.ScrollRow = ActiveCell.Row



Genius is 99% perspiration and 1% inspiration
 
Old July 24th, 2006, 08:32 PM
Authorized User
 
Join Date: Jun 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yep, that worked great. i think i had posted this earlier.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink sryap3 Access VBA 1 November 20th, 2008 04:25 PM
How we can use hyperlink nagham Crystal Reports 0 February 9th, 2007 03:51 AM
hyperlink hyperlink sbhandar Classic ASP Basics 6 August 26th, 2004 02:04 AM
hyperlink pab006 Classic ASP Basics 5 December 17th, 2003 10:33 AM
Hyperlink viktor26 Classic ASP Basics 0 October 19th, 2003 09:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.