LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Combobox exit event search error

No problem, glad that I could help.

"Craig" wrote:

thanks for all your help, that got me closer, but still wasn't working
quite right, as i was stepping that through it wasn't setting anything
as the email address (or the range). so i took your suggestions and
incorporated them into my original code, after some further debugging,
it works great, here's the code i ended up with, thanks again

Private Sub RequestorCBox_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim myEmail As String
Dim myRequestor As String
Call TurnOff
myRequestor = RequestorCBox.Value
If RequestorCBox.Value < "" Then
Sheets("Data").Select
Range("e10:e21").Select
On Error Resume Next
Selection.Find(What:=myRequestor, After:=ActiveCell,
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns,
searchdirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
On Error GoTo 0
If (Not ActiveCell Is Nothing) Then
ActiveCell.Offset(0, 1).Select
myEmail = ActiveCell.Value
Me.EmailBox.Value = myEmail
End If
End If
End Sub


 
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
MsgBox in Enter event causes combobox not to run Change event Richard Excel Programming 0 March 6th 06 02:52 PM
Need some help with Exit Event Matt[_31_] Excel Programming 4 April 1st 05 12:22 AM
ComboBox Exit No Name Excel Programming 4 June 2nd 04 03:53 PM
combobox exit event Dave D[_3_] Excel Programming 0 April 28th 04 10:22 PM
Exit Event Michael J. Malinsky Excel Programming 1 February 27th 04 06:40 PM


All times are GMT +1. The time now is 12:36 AM.

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"