I have an input box gathering a loan number. These variable contents are entered into cell “b45” on sheet “Return item”. The cell has a definedname of “LoanNumber”
>Dim Message, Title, MyValueB
>Message = “Enter the Loan number for the item(s)you wish to return.”
>’ Set prompt.
>Title = “Return Loan Item” ‘ Set title.
>’ Display message, title, and default value.
>MyValueB = InputBox(Message, Title)
>Sheets(“Macros”).Select
>Range(“B45:B45”) = MyValueB
This all works fine, however when I try and find this loan number on the register sheet I am currently using the following
>Sheets(“Register”).Select
>Columns(“A:A”).Select
>Selection.Find(What:=”3″, After:=ActiveCell, LookIn:=xlValues,
>LookAt:=_
>xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
>MatchCase:=False) _
>.Activate
The above is hard coded to find loan number “3” as an example. I am unable to make the find function work using the variable input obtained using the information obtained from the input box.