Kod:
Private Sub CommandButton1_Click()
Set DaB = New ADODB.Connection
myp = "C:\Belgelerim\test.XLS"
DaB.Open "Driver={Microsoft Excel Driver (*.xls)}; DBQ=" & myp
Set RaS = New ADODB.Recordset
kod1 = UserForm1.TextBox1.Value / 1
kk = UserForm1.TextBox2
SKL = "SELECT * FROM [sayfa$] WHERE id= '" & kod1 & "'"
[color=blue]RaS.Open SKL, DaB, 1, 3[/color]
kk = RaS("AdiSoyadi")
DaB.Close
Set DaB = Nothing
RaS.Close
Set RaS = Nothing
End Sub