Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have this code for looking up the week (in numbers). The code is working fine with the exception that I would like to scroll through the window so that the chosen week appears on the screen. Can anyone help me out? Private Sub Worksheet_Activate() Dim c As Range Dim firstAddress As String Dim myAns As Integer myAns = Application.InputBox("Enter a week number", , 1, , , , , 1) With Worksheets(1).Range("a1:a500") Set c = .Find(myAns, LookIn:=xlValues) If Not c Is Nothing Then firstAddress = c.Address Do c.Select Loop While Not c Is Nothing And c.Address < firstAddress End If End With End Sub -- Inge ------------------------------------------------------------------------ Inge's Profile: http://www.excelforum.com/member.php...o&userid=27257 View this thread: http://www.excelforum.com/showthread...hreadid=467692 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is it posible to jump to or search for a certian worksheet? | Excel Worksheet Functions | |||
Jump to cell based on cell results created by calendar control too | Excel Discussion (Misc queries) | |||
Creating a search and "jump to" function | Excel Discussion (Misc queries) | |||
How do I double click a cell and jump to cell's referenced cell | Excel Discussion (Misc queries) | |||
Search for Value from InputBox | Excel Programming |