Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default InputBox - search for value and jump to cell


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it posible to jump to or search for a certian worksheet? Cheryl Excel Worksheet Functions 2 August 7th 09 04:09 PM
Jump to cell based on cell results created by calendar control too JB Excel Discussion (Misc queries) 3 January 15th 08 08:18 PM
Creating a search and "jump to" function Brisebear Excel Discussion (Misc queries) 3 August 21st 06 02:07 AM
How do I double click a cell and jump to cell's referenced cell JerryJuice Excel Discussion (Misc queries) 2 September 10th 05 10:24 PM
Search for Value from InputBox Tempy Excel Programming 9 April 14th 05 09:42 PM


All times are GMT +1. The time now is 08:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"