+ Reply to Thread
Results 1 to 6 of 6

Update of worksheet using macro

  1. #1
    Forum Contributor
    Join Date
    02-05-2008
    Posts
    116

    Update of worksheet using macro

    Hi

    Im wondering if anyone can help me, Ive created a document that ive attached which is a allocation of machine parts.(Par 3 Auto Spec & Allocation test)
    I would like to be able to press a button which will open a document (costings2test), and update using the Part Number as a reference, that will then fill all the other fields in if incomplete or incorrect from the 'costings2test' Document, which is always correct. Im ok with the creating the macro and opening the document but I am stuck on the code that will look up and update the information from one doc. to another, can anyone help please?


    Denzil
    Attached Files Attached Files

  2. #2
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    Denzil,

    Here is some of the code elements you would probably use. This is not a functioning subroutine and you will need to add code to get it to work, but I believe it will get you started.

    Please Login or Register  to view this content.
    If you have questions, please ask and I will try to help. I do not program in Excel for a living, but I have been programming for quite a few years to make my everyday job simpler. If I can help, I will.

    I hope this helps you!
    Sincerely,
    Jeff

  3. #3
    Forum Contributor
    Join Date
    02-05-2008
    Posts
    116
    hi Jeff

    Many Thanks thanks for your quick reply, Im not as experienced in vba so im not sure how to fill the gaps in the code, how do I figure out where to add the nessesary code?

    Thanks again

    Denzil

  4. #4
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    Denzil,

    Give this a try. I added a little more code. Basically, it looks at Col B on your form and if the value is not blank or Part No., it grabs the value and tries to find it on the other spreadsheet. If it finds the Part No., it updates the values on the form.

    Hopefully this will give you a little more to work with. If you need more help, just post back. I live in the US so I don't know what kind of a time difference we have.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-05-2008
    Posts
    116

    Talking

    Hi Jeff

    That was perfect!! It did exactly as i wanted, just required a few very minor changes that i could just about handle!

    Many Thanks for your help

    Denzil

  6. #6
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    Denzil,

    I'm glad it worked for you! I'm never really sure how much experience with VBA a person has so it is hard to determine how much code to send. Always glad to add more if I don't give enough the first round.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1