Print

Print


Skip the ("...") around the textbox and it will work. 

By the way, you should test for "Nothing" value in case 
there is no match, or you will get an error. Perhaps 
something like this...


   Dim c As Range
   Dim SalgsNr as Variant

   SalgsNr = Me.cboSalesNo.Value

   With shtMenySalg.Columns(3)
      Set c = .Find(what:=SalgsNr, LookIn:=xlValues, LookAt:=xlWhole, _
			SearchOrder:=xlByColumns, MatchCase:=False)

      If c Is Nothing Then
'        ... do something
      Else
         ... do something else
      End If

   End With


Regards,
Vidar



dear List

I am trying to allow a value from a textbox on a user form to find a value
in row f.  The current method shown below does not work any idea's?

Private Sub OK_button_Click()

 Set findcell = Range("f1:f100").Find _
(what:=("=textbox1.text"))

 foundcell.Activate
 UserForm2.Hide
 End Sub






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%