#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default goto row

Private Sub Combobox1_Click()
sStr = Combobox1.Value
With worksheets("Sheet1")
.Activate
.Columns(2).Font.ColorIndex = xlAutomatic
Set rng = .Columns(2).Find(What:=sStr, _
After:=.Range("B65536"), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not rng Is Nothing Then
rng.Select
rng.Font.ColorIndex = 3
Else
MsgBox sStr & " not found"
End If
End Sub

--
Regards,
Tom Ogilvy


"geebee" (noSPAMs) wrote in message
...
hi,

Let's say I have a combobox in a sheet, with values. Whenever a value is
selected, I want the sheet to move to the first occurence of that selected
value in column B. How can this be done?

I would also like for that value's cell be colored in red.

Thanks in advance,
geebee



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
IF then GoTo [email protected] Excel Programming 3 November 25th 06 11:21 PM
When To use GOTO Sub? MC82[_5_] Excel Programming 4 May 10th 06 03:02 AM
On Error Goto doesn't goto Paul Excel Programming 1 October 15th 04 03:51 PM
On Error Goto doesn't goto Paul Excel Programming 0 October 15th 04 03:05 PM
Goto next used row JonWayn Excel Programming 0 November 20th 03 03:00 AM


All times are GMT +1. The time now is 02:04 PM.

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

About Us

"It's about Microsoft Excel"