Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That worked perfectly. Thank you so much!
On May 22, 2:03*pm, "Patrick Molloy" wrote: Sub username() * Dim sUsername As String * * Dim sPrompt As String * * Dim found As Range * * sPrompt = "Please enter vendor name" * * sUsername = InputBox(sPrompt, "Select Name...", "") * * Sheets("list").Activate * * Set found = Cells.Find(What:=sUsername, After:=ActiveCell, _ * * LookIn:=xlFormulas, LookAt:=xlPart, _ * * * * SearchOrder:=xlByColumns, SearchDirection:=xlNext, _ * * MatchCase:=False, SearchFormat:=False) * * If Not found Is Nothing Then * * * * found.Select * * Else * * * * MsgBox "Unable to find " & sUsername * * End If End Sub wrote in message ... This wouldn't work. Any other ideas? I keep getting an error message. Note I made an addition to the macro. * *SORT_DATE * *SORT_VENDOR * *Dim sUsername As String * *Dim sPrompt As String * *sPrompt = "Please enter vendor name" * *sUsername = InputBox(sPrompt, sTitle, sDefault) * *Sheets("list").Select * *Range("C2").Select * *Cells.Find(What:=sUsername, After:=ActiveCell, LookIn:=xlFormulas, LookAt _ * * * *:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ * * * *False, SearchFormat:=False).Select * *If sUsername = "" Then * * * MsgBox "You have cancelled the search." * * * Sheets("welcome").Select * * * Range("a1").Select * * * *Exit Sub * *End If End Sub- Hide quoted text - - Show quoted text - |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
OPENFILENAME A P I. User cancels ? | Excel Programming | |||
Deleting a menu in BeforeClose but user Cancels the Save | Excel Programming | |||
Problem is adding options to ComboBox | Excel Programming | |||
How to present User with Print Options | Excel Programming | |||
How to extend user options | Excel Programming |