Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.
Private Sub cmbFind_Click() Dim strFind As String 'what to find Dim FirstAddress As String Dim rSearch As Range 'range to search Set rSearch = workstn.Range("bf7", Range("bf65536").End(xlUp)) Dim f As Integer strFind = Me.unmtxt.Value 'what to look for With rSearch Set c = .Find(strFind, LookIn:=xlValues) If Not c Is Nothing Then 'found it workstn.Rows(c.Row).Select With Me 'load entry to form .proftxt.Value = c.Offset(0, 1).Value .typetxt.Value = c.Offset(0, 2).Value .descritxt.Value = c.Offset(0, 3).Value .detailtxt.Value = c.Offset(0, 4).Value .versiontxt.Value = c.Offset(0, 5).Value .locationtxt.Value = c.Offset(0, 6).Value .cmbAmend.Enabled = True 'allow amendment or .cmbDelete.Enabled = True 'allow record deletion f = 0 End With FirstAddress = c.Address Do f = f + 1 'count number of matching records Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> FirstAddress If f > 1 Then Select Case MsgBox("There are " & f & " instances of " & strFind, vbOKCancel Or vbExclamation Or vbDefaultButton1, "Multiple entries") Case vbOK FindAll Case vbCancel 'do nothing End Select Me.Height = frmMax End If Else: MsgBox strFind & " doesn't seem to be on the list. You may have to use a different name" 'search failed End If End With If workstn.AutoFilterMode Then workstn.Range("Bf9").AutoFilter End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|how can this formula be modified so that it doesn't require control shift enter||3||38|
|Delete row if does not start with 0||43||38|
|I NEED KEEP THE CONDITIONAL FORMATTING||24||30|
|Macro problems with Excel file||6||27|