[RESOLVED] [Excel]Problem in stamping a record on the worksheet
hi guys,
need help on this code. where i is equal to the index number of the record that i've searched.
My problem is this code does not stamp the changes i made..
Code:
Private Sub SaveCh_Click()
Dim i As Long
i = Sheets("Registers").Range("CA2").Value
Sheets("Datasheet").Range("A" & i + 1).Value = txtPN.Value
Sheets("Datasheet").Range("A" & i + 1).Value = txtPN.Value
Sheets("Datasheet").Range("B" & i + 1).Value = txtPRF.Value
Sheets("Datasheet").Range("C" & i + 1).Value = DTPicker1.Value 'Req Date
Sheets("Datasheet").Range("D" & i + 1).Value = DTPicker2.Value 'Date Recvd
Sheets("Datasheet").Range("E" & i + 1).Value = cboAcct.Value
Sheets("Datasheet").Range("F" & i + 1).Value = txtBU.Value
Sheets("Datasheet").Range("G" & i + 1).Value = txtCCode.Value
Sheets("Datasheet").Range("H" & i + 1).Value = cboPosition.Value
Sheets("Datasheet").Range("I" & i + 1).Value = txtDesc.Value
Sheets("Datasheet").Range("J" & i + 1).Value = txtJG.Value
Sheets("Datasheet").Range("K" & i + 1).Value = txtHC.Value
Sheets("Datasheet").Range("L" & i + 1).Value = cboReason.Value
Sheets("Datasheet").Range("M" & i + 1).Value = DTPicker3.Value 'Hiring Date
Sheets("Datasheet").Range("N" & i + 1).Value = txtApplicants.Value
Sheets("Datasheet").Range("O" & i + 1).Value = DTPicker4.Value 'JO Date
Sheets("Datasheet").Range("P" & i + 1).Value = DTPicker5.Value 'Neo Date
Sheets("Datasheet").Range("Q" & i + 1).Value = DTPicker6.Value 'Start Date
Sheets("Datasheet").Range("R" & i + 1).Value = txtSource.Value
Sheets("Datasheet").Range("S" & i + 1).Value = txtJORem.Value
Sheets("Datasheet").Range("T" & i + 1).Value = DTPicker7.Value 'Cancellation Date
Sheets("Datasheet").Range("U" & i + 1).Value = DTPicker8.Value 'On HOld date
Sheets("Datasheet").Range("V" & i + 1).Value = DTPicker9.Value 'Endorsement HR
Sheets("Datasheet").Range("W" & i + 1).Value = DTPicker10.Value 'Endorsement Acct
Sheets("Datasheet").Range("X" & i + 1).Value = DTPicker11.Value 'Endorsement Client
Sheets("Datasheet").Range("Y" & i + 1).Value = txtHR_Dur.Value
Sheets("Datasheet").Range("Z" & i + 1).Value = txtAcct_Dur.Value
Sheets("Datasheet").Range("AA" & i + 1).Value = txtClient_Dur.Value
MsgBox "Record updated!"
Call UserForm_Initialize
End Sub
Re: [Excel]Problem in stamping a record on the worksheet
What do you mean by "stamp the changes"?
Re: [Excel]Problem in stamping a record on the worksheet
stamp?
you have the following line in twice
Code:
Sheets("Datasheet").Range("A" & i + 1).Value = txtPN.Value
do you mean record and move the pointer down?
If so I cannot see a line that refers to that cell to add one to the pointer...
Re: [Excel]Problem in stamping a record on the worksheet
Stamping = Transfering/saving values from userform textbox to worksheet rows. Thanks Ecniv i didnt notice that one. :D
Case Closed! haha i already figureout.. it should be i+67 because my record starts on row 68.. :D i did'nt notice that it is stamping on the upper rows cause i hid the upper row..
Re: [Excel]Problem in stamping a record on the worksheet
Please post your solution. It could help someone else with the same, or similiar problem.
Thanks. :)
(Also, if you consider your question to be resolved please help us out by pulling down the Thread Tools menu and clicking the Mark Thread Resolved menu item. That will let everyone know that you have your answer.)