+ Reply to Thread
Results 1 to 6 of 6

Paste shape into any location

  1. #1
    Registered User
    Join Date
    11-15-2020
    Location
    Hamlin, NY
    MS-Off Ver
    Microsoft 365
    Posts
    32

    Paste shape into any location

    Hello y'all. I created a shape with a fill color and can insert it into a cell.

    I can then go to that cell and copy and paste it to another cell easily.
    I don't want to have to go through that process every time and created
    a macro to help. I need to tweak that macro.

    I've placed that shape in a cell all by itself, and I've created a macro which
    will take the program to that cell and copy it for me. I also have the macro
    pasting that item to a particular cell.

    So what I need is to be able to tell the macro to post it anywhere I desire,
    not into the cell I wrote in the macro.

    I hope this makes sense. I appreciate this forum and the members within
    that so graciously give of their time to help newbies like me :-)
    Last edited by 6StringJazzer; 11-23-2020 at 03:28 PM. Reason: moved from Excel General; fixed title

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Paste shape into any location

    Please show us all of the code you have so far. Also, how do you want to specify "anywhere I desire"? A cell? A set of (x,y) coordinates? How will you determine that, and how do you want to communicate it to the code?

    Macro Assistance Appreciated was not a very descriptive title so I changed it for you. Please take the time to review our rules. Take note of Rule #1.

  3. #3
    Registered User
    Join Date
    11-15-2020
    Location
    Hamlin, NY
    MS-Off Ver
    Microsoft 365
    Posts
    32

    Re: Paste shape into any location

    Thank you 6StringJazzer -

    Here is the code for the macro I created:

    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

    So B3 is the cell that has the green star shape inserted in it.
    B26 was just a random blank cell on my worksheet where I pasted the green star,
    to see if the macro did what I wanted. The macro worked perfectly.

    I could also create another macro for the red star.

    I want to be able to use ctrl + g (the macro) to paste a star into the cell of
    my choice anywhere from B7 to H22.

    I've attached the worksheet if that helps you visualize it. Thanks SO much.
    Attached Files Attached Files
    Last edited by 6StringJazzer; 11-24-2020 at 03:33 PM.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,167

    Re: Paste shape into any location

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Paste shape into any location

    Maybe (see attached)
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Paste shape into any location

    Or maybe without macro buttons. (See attached)
    These macros should be used for each shape. Replace what is currently in the attachment. (error checking added)
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jolivanes; 11-24-2020 at 10:19 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Save Ranges to PDF Macro Any help is appreciated....
    By rcicconetti in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2016, 03:17 AM
  2. Excel Sensitivity Report - Assistance Appreciated!
    By abbycat02 in forum Excel General
    Replies: 3
    Last Post: 02-09-2016, 12:45 AM
  3. VBA Macro to copy data between sheets (Any help is appreciated)
    By oz12 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-29-2013, 03:47 AM
  4. Help with an error 91 issue - assistance greatly appreciated.
    By Bighitch in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2012, 02:08 PM
  5. Macro or Formula needed - Help much appreciated.
    By Benhouse86 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-20-2012, 07:10 AM
  6. Pro Rata Formula - assistance appreciated
    By leviathan54 in forum Excel General
    Replies: 2
    Last Post: 02-01-2012, 09:08 PM
  7. Replies: 4
    Last Post: 07-13-2005, 07:05 PM

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