Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to move the active cell so that its column is displayed as
the leftmost column on my screen. I have two sheets - one with a Titles across the top row and the second with a list of those titles. I want to be able to double click on the second sheet item, have it match the column on the first. This part works fine. The issue is how to have the chosen title display in the left most column of my screen. Thanks. My code: __________________________________________________ ______________________________ Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Target.Column = 2 And Target.Value < "" Then jumpToHist Target.Value End Sub Sub jumpToHist(tgt As String) On Error Resume Next col = Application.Match(tgt, Worksheets("Hist (2)").Range("Print_Titles"), 0) With Sheets("Hist (2)") .Activate .Cells(1, col).Activate End With On Error GoTo 0 End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All you need is this:
Application.Goto Sheets("Hist (2)").Cells(col, 5), True instead of this: With Sheets("Hist (2)") .Activate .Cells(1, col).Activate End With -- Jim Rech Excel MVP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Screen does not scroll as active cell moves down the page | Excel Discussion (Misc queries) | |||
how do I keep the active cell or row in the middle of the screen | Excel Discussion (Misc queries) | |||
Active cell moves off the screen | Excel Discussion (Misc queries) | |||
Moving active cell after copy | Excel Programming | |||
Moving active cell | Excel Programming |