+ Reply to Thread
Results 1 to 4 of 4

Macro to copy and paste or maybe lookup fx?

  1. #1
    Registered User
    Join Date
    03-17-2006
    Posts
    29

    Macro to copy and paste or maybe lookup fx?

    I have been helped in other forums, but I am still desperate for more help. Any help will be highly appreciated.
    It may hard to see my problem without picture so I am attching an example file:
    * Sheet1: Data is updated and varied from time to time
    * Sheet3: reference or data to be looked up
    A macro, I am thinking is: if sheet1!B3=1, macro will look into Sheet3 and find the retangle shape in cell B2 (Sheet3), then copy this cell and paste into Sheet2!B3. Sheet2 is what I am looking for as a result.
    My thinking is for just a very beginner and I am sure as I have seen in this Excelforum, there are ton of ideas and amazing stuffs and my problem can be resloved in any other incredible ways.
    Thanks for your help
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to copy and paste or maybe lookup fx?

    Hello go4cdt,

    The attached workbook has a button on Sheet1 to run the macro. When it runs, it will take the numbers on Sheet1 and use these as an index to column "B" on Sheet3. The shapes on Sheet3 are loaded into a collection object by the macro. The shape is returned from the collection by using its cell address in column "B" on Sheet3. The shape is then copied to the clipboard and pasted into an Image control on Sheet2. The controls are all sequential which makes referencing easy and direct.

    The macro that pastes the shape into the Image control was written by Stephen Bullen. Don't worry if you don't understand it. It is very advanced code. If you have any questions about how the code works or why it was done a certain way, just ask. Due to length, I can not post Stephen's code in this post,

    Macro to Fill Image Controls
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    03-17-2006
    Posts
    29

    Re: Macro to copy and paste or maybe lookup fx?

    Hello Leith Ross;
    It works amazingly. Thank you so much! However I really lost with all the codes as how they work, would you please explain? Appreciate it.
    Go4cdt

  4. #4
    Registered User
    Join Date
    03-17-2006
    Posts
    29

    Re: Macro to copy and paste or maybe lookup fx?

    Hello Leith Ross;
    What should I do if I want to add or change images in Sheet3, and add more rows & columns in Sheet1? Thanks in for your help.

    Go4cdt

+ 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