+ Reply to Thread
Results 1 to 3 of 3

vba macro - search ID, copy, paste

Hybrid View

sgp vba macro - search ID, copy,... 10-30-2011, 02:17 PM
rylo Re: vba macro - search ID,... 10-30-2011, 09:15 PM
sgp Re: vba macro - search ID,... 10-31-2011, 07:00 AM
  1. #1
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    vba macro - search ID, copy, paste

    Hi All

    The coding for my macro button does not seem to work properly, I have the following worksheets:

    - SiteDetails - this worksheet acts like a user form
    - SiteRecords - This is where the information is to be saved based on the Site ID

    The code currently pastes some information based on the correct ID but does not paste all the information...I have attached an example to illustrate my point.

    The highlighted yellow cells is the information I would like to macro to pick up, also would be helpful if the information in the check box (at the bottom of the worksheet) could also be copied through.

    Much Appreciated!
    Attached Files Attached Files
    Last edited by sgp; 10-31-2011 at 11:43 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: vba macro - search ID, copy, paste

    Hi

    Couple of things.

    1) Some of the array references don't point to the cells with data. j6 should be h6. You will have to correct all of these.
    2) Some of the items have been missed. J16 for the mobile number is one.
    3) You will have to ungroup all the controls, (some twice) and then link them to a cell. Once you have done that, then you will have to include the cell references in the array.
    4) Once you have done that, and got all the items in the correct order, then you will have to change the 11 in
    r.Resize(, 11)
    to the correct number. Didn't work it all out, but would be somewhere around 95 ish

    HTH

    rylo

  3. #3
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: vba macro - search ID, copy, paste

    Thanks for all your help!!!!!

    Quote Originally Posted by rylo View Post
    Hi

    Couple of things.

    1) Some of the array references don't point to the cells with data. j6 should be h6. You will have to correct all of these.
    2) Some of the items have been missed. J16 for the mobile number is one.
    3) You will have to ungroup all the controls, (some twice) and then link them to a cell. Once you have done that, then you will have to include the cell references in the array.
    4) Once you have done that, and got all the items in the correct order, then you will have to change the 11 in
    r.Resize(, 11)
    to the correct number. Didn't work it all out, but would be somewhere around 95 ish

    HTH

    rylo

+ 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