Re: Getting a cell value displayed in textbox from Combox
Quote from StephenR;787900We don't need to see actual dta, dummy data will do.
sorry
i just cannot.
i figured some codding for second part but im getting : end if without block if , why?
Code
Private Sub Uf2update_Click()
Dim ctl As Control
Dim i As Long
Dim Rng As Range
Dim FindString As String
FindString = CB1.Value
For Each ctl In Me.Controls
If TypeName(ctl) = "textm" Then
For i = 2 To 2
If Not IsEmpty(Me.Controls("textm" & i)) And Not Len(Trim(Me.Controls("textm" & i).Value)) = 0 And (Me.Controls("textm" & i).Value) <> 0 Then
With Sheets("S5").Range("A:A")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
Application.Goto Rng.Offset(0, -8) = textm2.Value
End If
Next i
Next ctl
Unload Me
End Sub
Display More