skaswani
03-04-2008, 12:04 PM
dear sir,
i have problem making update values form
Ms Excel 2002, Windows Xp
** code to get values in to text box ***
Private Sub CommandButton1_Click()
Dim a
Dim i As Long
With Worksheets("sheet1")
a = Range(.Cells(1, 3), .Cells(1, 1).End(-4121))
End With
For i = 1 To UBound(a)
If a(i, 1) = TextBox1.Text Then Exit For
Next
If i > UBound(a) Then
MsgBox ("number not found"): Exit Sub
End If
TextBox3.Text = a(i, 3)
TextBox2.Text = a(i, 2)
End Sub
*** saving values ***
Private Sub CommandButton2_Click()
a(i, 2).Value = TextBox2.Value
a(i, 3).Text = testbox3.Value
End Sub
i am getting error here, please kindly help me out
thanks,
i have problem making update values form
Ms Excel 2002, Windows Xp
** code to get values in to text box ***
Private Sub CommandButton1_Click()
Dim a
Dim i As Long
With Worksheets("sheet1")
a = Range(.Cells(1, 3), .Cells(1, 1).End(-4121))
End With
For i = 1 To UBound(a)
If a(i, 1) = TextBox1.Text Then Exit For
Next
If i > UBound(a) Then
MsgBox ("number not found"): Exit Sub
End If
TextBox3.Text = a(i, 3)
TextBox2.Text = a(i, 2)
End Sub
*** saving values ***
Private Sub CommandButton2_Click()
a(i, 2).Value = TextBox2.Value
a(i, 3).Text = testbox3.Value
End Sub
i am getting error here, please kindly help me out
thanks,