PDA

View Full Version : Solved: to accept changes



slamet Harto
10-21-2009, 01:31 AM
Hi there,

Just adopted a code to accept changes on userform.
Please find the attached for reference

On Listbox try to select single row then make some change on textbox then click cmdsave button. you will see the value is overlap.

Can you help to fix this.
Many thanks in advance
Rgds, Harto

Bob Phillips
10-21-2009, 01:42 AM
I tried to change the Hrg Jual value for an item and it errored for me.

p45cal
10-21-2009, 04:08 AM
I suspect this line: Sheets("DbTrx").Range(Cells(rngMatch - 1, 2), Cells(rngMatch - 1, 10)) = _
Array(TxtNota.Text, TxtTrxDate.Value, TxtCodeBrg.Text, TxtNmBrg, TxtSalesPrice, _
CboDisc.Text, TxtSalesQty.Value, TxtBayar.Text, TBoxIDPlg.Text, TBoxNmCust.Text)
shouild be more like:rngMatch.Offset(, 1).Resize(1, 10) = _
Array(TxtNota.Text, TxtTrxDate.Value, TxtCodeBrg.Text, TxtNmBrg, TxtSalesPrice, _
CboDisc.Text, TxtSalesQty.Value, TxtBayar.Text, TBoxIDPlg.Text, TBoxNmCust.Text)but there are a lot of problems with the filtering resulting in no rows left, on my machine.

slamet Harto
10-21-2009, 04:35 AM
Hi Bob,

Thanks for quick reply. what error message you are getting it?

Hi P45cal,
you are correct.


but there are a lot of problems with the filtering resulting in no rows left, on my machine.
I'm really stuck with this. what is your suggestion?

Appreciated it for your help.

p45cal
10-21-2009, 04:55 AM
Step through the bit of code which adds filter criteria one line at a time, while watching the sheet, the instant one line of code reduces the number of rows left to none you know the line that's just executed could be causing problems. Do this and post that line of code here.

slamet Harto
10-21-2009, 05:59 AM
Hi P45cal

It has been solved now. Thanks for clearly explanation.
Best,
harto