+ Reply to Thread
Results 1 to 7 of 7

Copy and paste macros???

  1. #1
    Registered User
    Join Date
    10-27-2011
    Location
    Richmond, Va. USA
    MS-Off Ver
    Excel 2007
    Posts
    23

    Copy and paste macros???

    So I am creating a voice mail log for my department and when a teammate completes the task of returning a clients call they can click the button I have created and it will automatically fill in the current date and time for tracking purposes. Here is the code I am using:

    Please Login or Register  to view this content.
    Problem is that is the code for one button and for one record. We have anywhere between 100 and 200 voice mails to return each month. Is there a way that I can copy the entire row to include the button and the VBA so that the next line will look like this:

    Please Login or Register  to view this content.
    and so on all the way down? I know if I select the cell and grab the bottom right corner and drag it down it will copy the cells however the VBA does not come with it as I had hoped like a regular formula would.

    Any help is much appreciated!
    Attached Files Attached Files
    Last edited by jeffreybrown; 07-28-2012 at 08:52 PM. Reason: Please use code tags

  2. #2
    Registered User
    Join Date
    10-27-2011
    Location
    Richmond, Va. USA
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Copy and paste macros???

    any input would be great!

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy and paste macros???

    You do not need to have 1 button for each entry.

    You can have just 1 button with this code
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Copy and paste macros???

    Please Login or Register  to view this content.
    Kind regards, Harry.

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy and paste macros???

    I suggest to eliminate Buttons and use this code
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    07-04-2012
    Location
    Al Khor, Qatar
    MS-Off Ver
    Excel 2013
    Posts
    101

    Re: Copy and paste macros???

    @ts try this one I just edited the macro created by arlu1201 to copy the format of the first row
    and also I eliminated the button and assigned ctrl+shft+q to do the task I guess you don't need the macro for this you can use keyboard express instead. credits goes to arlu1201. thank you.
    Attached Files Attached Files
    Last edited by tangangtanga; 07-30-2012 at 12:08 AM.

  7. #7
    Registered User
    Join Date
    10-27-2011
    Location
    Richmond, Va. USA
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Copy and paste macros???

    thanks so much for all the help folks!!!!

    just wondering if there is a way to copy macros or (as I am learning) there is no need with just using better code?

    Hey thanks again to all for teh help!

+ 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