Consulting

Results 1 to 6 of 6

Thread: Solved: to accept changes

  1. #1
    VBAX Tutor
    Joined
    Sep 2007
    Posts
    265
    Location

    Solved: to accept changes

    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

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I tried to change the Hrg Jual value for an item and it errored for me.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    I suspect this line:[vba] 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)
    [/vba]shouild be more like:[vba]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)[/vba]but there are a lot of problems with the filtering resulting in no rows left, on my machine.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  4. #4
    VBAX Tutor
    Joined
    Sep 2007
    Posts
    265
    Location
    Hi Bob,

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

    Hi P45cal,
    you are correct.

    Quote Originally Posted by p45cal
    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.

  5. #5
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    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.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  6. #6
    VBAX Tutor
    Joined
    Sep 2007
    Posts
    265
    Location
    Hi P45cal

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •