+ Reply to Thread
Results 1 to 5 of 5

Macro that copies an unpredictable generated range so I can paste in other programs

  1. #1
    Registered User
    Join Date
    07-29-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    6

    Macro that copies an unpredictable generated range so I can paste in other programs

    Good morning all, and thank you kindly for reading this.

    I have a macro that copies rows from my DAILY OCCURENCE sheet that have a YES in them to my MANAGER SUMMARY SHEET and G1 is selected which has a hyperlink that opens a new email with the manager's email address and Subject pre-assigned.

    I then have to manually go back to the newly generated summary sheet and select the cells and paste them into the email that was just opened.

    Is there a way that the generated rows are already copied in memory and all i have to do is CTRL+V into the new email, or even better, the cells are pasted in the email automatically? So basically either the information being copied over stays in memory, or after it is copied into the summary sheet it is copied again. I just dont know how to copy unpredictable ranges generated by macros.

    The code that generates my summary sheet for my manager is below.


    Please Login or Register  to view this content.
    Thanks heaps guys.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Macro that copies an unpredictable generated range so I can paste in other programs

    Sheets("Manager Summary Sheet").Select could be ManagerSheet.Select


    Not tested


    Please Login or Register  to view this content.

    Why not build the email from Excel to? You can remove the .send function to display the email before sending.

    google Automating Outlook VBA.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    07-29-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro that copies an unpredictable generated range so I can paste in other programs

    Thank you. Will give it a go.

  4. #4
    Registered User
    Join Date
    07-29-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro that copies an unpredictable generated range so I can paste in other programs

    unfortunately it froze my email program and I think it selected and copied a large amount of cells as indicated by the selection box with an area beyond my actual used range.

  5. #5
    Registered User
    Join Date
    07-29-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro that copies an unpredictable generated range so I can paste in other programs

    Found a solution copying a dynamic range and keeping it in memory to manually paste it anywhere without needing to use the mouse to drag and select.
    Worksheet1 is the worksheet you want to copy the range from,
    A1 is the cell with the begining of the range
    G is the column with the last cell with the information you want to copy. The code is as follows:

    Please Login or Register  to view this content.
    Last edited by DaKhoda; 06-08-2014 at 06:13 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. [SOLVED] Macro that copies every 600 rows and paste data in new spreadsheet
    By Bealey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-27-2012, 09:38 AM
  2. Unpredictable Macro Run Speed
    By awan0126 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2011, 12:28 PM
  3. macro that copies and paste info into another worksheet
    By TimfromFinland in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2008, 04:54 PM
  4. [SOLVED] Dynamically Generated Range using Macro
    By [email protected] in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2006, 03:15 AM
  5. [SOLVED] Subscript out of range ... sometimes! (Same code unpredictable re
    By Dennis in forum Excel General
    Replies: 3
    Last Post: 08-11-2005, 10:05 AM

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