Putting data from a useform in multiple sheets, but different rows

  • Hi guys,


    this is my first post on here. I'm searching for a code that add the textboxes from a userbox in another sheet but just different rows. I can find the most on the internet and quite understand it, but this one I find hard to solve.
    The codes I already have for adding data in the last row is a the following (the text is Dutch, I'm sorry for that)

    Code
    Private Sub Cmdbutton_add_Click()
    WsOne = Blad6.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
    Cells(WsOne, 1).Value = SKUadd.Text
    Cells(WsOne, 2).Value = Naamadd.Text
    Cells(WsOne, 3).Value = Productomadd.Text
    Cells(WsOne, 4).Value = Productcatadd.Text
    End sub


    Now I want "SKUadd" and "Naamadd" to be in another sheet that is called "Voorraden" or "Blad3" at the first two rows. And I want "Productcatadd" in that same sheet but at the 5th column.


    Could anyone help me with this problem? I would like to hear from you guys :)


    p.s. I'm a complete newbie lol

  • Re: Putting data from a useform in multiple sheets, but different rows


    Quote

    another sheet that is called "Voorraden" or "Blad3"


    What do you mean or?
    Did you mean and, you want both of them in both sheets?

    Quote

    the first two rows


    One in row one and one in row two, which cells exactly?

    Quote

    And I want "Productcatadd" in that same sheet but at the 5th column.


    Which cell exactly?
    Rather than saying row 1 and row 2 or 5th. column, why not say A1 or A5 etc., the way you are wording it is confusing?

    Bruce :cool:

  • Re: Putting data from a useform in multiple sheets, but different rows


    Quote from skywriter;769816

    What do you mean or?
    Did you mean and, you want both of them in both sheets?


    One in row one and one in row two, which cells exactly?


    Which cell exactly?
    Rather than saying row 1 and row 2 or 5th. column, why not say A1 or A5 etc., the way you are wording it is confusing?


    Sorry that it is quite confusing, I think it is because I'm not native to English.


    So to make it clear: I have a main sheet where I have the macro button. That sheet is called "Producten" and I have another sheet where I want a part of the data to be placed in as well that is called "Voorraden".


    So the code I have already made up is for the sheet " Producten" and it works fine. Now I want textbox SKUadd to be placed in "A4:A", I want Naamadd to be in "B4:B" and I want productcatadd to be in "E4:E" of the other sheet called "Voorraden".


    I hope this makes sense and you could understand it. You could really be a big problem solver to me and I would really appreciate your help.

  • Re: Putting data from a useform in multiple sheets, but different rows


    Maybe this.

    Bruce :cool:

  • Re: Putting data from a useform in multiple sheets, but different rows


    This code will place the entries in the ActiveSheet


    Code
    WsOne = Blad6.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row 
        Cells(WsOne, 1).Value = SKUadd.Text 
        Cells(WsOne, 2).Value = Naamadd.Text 
        Cells(WsOne, 3).Value = Productomadd.Text 
        Cells(WsOne, 4).Value = Productcatadd.Text


    This will use Blad6


Participate now!

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