Consulting

Results 1 to 6 of 6

Thread: copy data with pushbutton

  1. #1

    copy data with pushbutton

    Hello
    I have the following problem;
    I have 2 documents; ‘Inventarisation’ & ‘Summary’.
    Document ‘Inventarisation’ will be sent to several people.
    They fill in a unique code in cel G3, and fill in a number(3,2,or 1) in cells G5:G9, G11:G15, G17:G21.
    They save the document and sent it to me.

    Now I would like a code so when I click the Button ‘Place’ in the document ‘Inventarisation’,
    It searches for the right PrimaryKey and puts the Code that was put in Cell G3 in document ‘Inventarisation’ and puts it behind the same PrimaryKey in document ‘Summary’ in the Colomn that matches the number that was put in document ‘Inventarisation’. And a Separator behind it.
    If the workbook is open then ok, if it is closed, then it should be opened.
    In Cell I1 I place the Path to the document.
    So; If I put in code aaa in Cel G3, and number 3 in cel G6, behind PrimayKey ‘Manhattan-P1-apartment’.
    the, when I push the Button, I should get ‘aaa|’ in Cell G6 in document ‘Summary’.
    ‘|’ is the separator I use.

    Can anybody help me with the code for this problem.

    Thanks

    Summary.xlsm
    Inventarisation.xlsm

  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,638
    Ha Marc,

    Waarom in een Engelstalig forum ?
    Vermijd cellen met samengestelde gegevens.
    Vermijd ook samengevoegde cellen (zoals in jouw 'inventory' bestand).

  3. #3
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    I would have Inventorization just send Column G as an array and have Summary do the work of parsing the array and filling in the cells.

    If The Thisworkbook Code Page in Project has this code
    Public Property Let NewRecord(Input As Variant)
       'Code to parse Input (array) and do the work on the sheet
       'Can use other subs
    End Property
    Then all the Inventorization books have to do is connect to Project and send
    Project.xlsm.NewRecord = Array_Of_ColumnG
    'exact Wording depends on Code of Project and Inventorization
    BTW, "Project" is a bad name for a workbook
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  4. #4
    SamT, Thanks for the reaction.
    Could you provide me with the actual code.
    I am by no means a VBA-person. It just doesn't stick, no matter how much I try.
    So the code would be absolutely fantastic.

  5. #5
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Sorry, Actual code requires an intimate knowledge of your Network Domain and a pretty good understanding of the Data structure for both workbooks,

    Try contacting snb at his more suggestions ... link. Use the Suggestions button on that page. I think he is somewhat close, geographically and he speaks your language. both attributes will be beneficial.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  6. #6
    Ok, thanks for the reaction anyway.

Posting Permissions

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