Userform edit file multirows

  • Dear All,

    Please help for my Userform in menu edit :

    i can't upload file here error "500 IO error..." !! Upload in mediafire

    Thanks - John

  • Re: Userform edit file multirows

    You declare variables and use them., but you don't seem to give them a value. You also have code above Option Explocit and declarations declared in the wrong place.

    See the databaseForm example

    Try debugging your code to start finding errors, there's too many for me to work through

  • Re: Userform edit file multirows

    Exactly as Roy said - you are getting errors because RowFound1,RowFound2 etc have no value so

    .Cells(RowFound1, "M") = ritem1.Text
    'is the same as
    .Cells(null, "M") = ritem1.Text

    These variables "appear to be declared" but never assigned a value - if excel does not know what row "RowFound1" refers to how can the value from the textbox be entered into the worksheet. In actual fact these variables are NOT declared as far as the code is concerned. Is this just cut and pasted from some other code? Did they assign values somewhere to these variables (and these variables should be declared within the Button Click event not outside as Roy has already pointed out). You probably need to get back to some basics and understand what is going on with the code.

    [/SIZE]&WCF_AMPERSAND&WCF_AMPERSAND&WCF_AMPERSAND[SIZE=2]You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.[/SIZE]

  • Re: Userform edit file multirows


    Also.. haven't looked at your Workbook.. but looking at your code posted above.. isn't there a lot of repetitive code.. ?

    Instead of 4 blocks of code.. maybe just 1 block with simple loop(RowFound1,2,3,4... ritem1,2,3,4).. see how those numbers could be a variable and just loop (1 to 4)..

  • Re: Userform edit file multirows

    Thanks for RoyUK, smuzoen, and apo.

    Yes i dont have basic VBA, but i'm try modified source

    My full list code it's

    My code break, i will think and try again.

    Thanks for help

  • Re: Userform edit file multirows

    Quote from royUK;700020

    have a look at the example that I posted a link to

    Yes i look and great project contact manager and dabase form right, but i need multi rows like invoice.

  • Re: Userform edit file multirows

    You have two forms in the workbook which are you using

    You have numerous problems with your code.

    The example on my site will add multiple rows one at a time to your invoice, if you adapt the code.

  • Re: Userform edit file multirows

    Hello RoyUK,

    i have $10 can solved my problem i just need "search & edit / replace" this my work ... if can i will go to hire section.

    Because my first code input database it's like this

    Thanks - John

  • Re: Userform edit file multirows

    Most of your code makes no sense - variables declared but not used, duplicated code, inefficient methods.

    The best thing you can do is forget your code and study an example that works and adapt that. Consider the Tutorial details in my download.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!