+ Reply to Thread
Results 1 to 6 of 6

Copy&paste Print loop help please

  1. #1
    Registered User
    Join Date
    11-10-2005
    Posts
    5

    Copy&paste Print loop help please

    Hi,

    I'm not very experienced in writing VBA at all and so find myself stuggling with what seems to be a simple task.

    I have a template which basically has a vlookup to a list (grni sheet). What im trying to do is to get excel to print the template and then copy and paste the next cell down from the list "grni sheet" and print again until it reaches the bottom of the list

    All I have so far is:

    ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
    Sheets("grni").Select
    ActiveCell.Offset(1, 0).Range("A1").Select 'i need this to work it's way down the list to the end'
    Selection.Copy
    Sheets("Manual Adjustment Form").Select
    ActiveCell.Offset(-4, 0).Range("A1").Select
    ActiveSheet.Paste
    ActiveCell.Offset(4, 1).Range("A1").Select
    Application.CutCopyMode = False
    ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
    If i can get this to work it is going to save so much time so any help or suggestions would be appreciated.

    Thanks
    Attached Files Attached Files
    Last edited by avit; 08-17-2011 at 04:30 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,118

    Re: Copy&paste Print loop help please

    Please take a few moments to re-read the forum rules and add CODE tags to your code example.

    While you're at it, please upload a sample workbook so the problem and data can be seen together in context.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    11-10-2005
    Posts
    5

    Re: Copy&paste Print loop help please

    Quote Originally Posted by TMShucks View Post
    Please take a few moments to re-read the forum rules and add CODE tags to your code example.

    While you're at it, please upload a sample workbook so the problem and data can be seen together in context.

    Regards
    Apologies, file is now uploaded.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,118

    Re: Copy&paste Print loop help please

    Maybe this will do what you want:

    Please Login or Register  to view this content.


    Regards

  5. #5
    Registered User
    Join Date
    11-10-2005
    Posts
    5

    Re: Copy&paste Print loop help please

    Quote Originally Posted by TMShucks View Post
    Maybe this will do what you want:

    Please Login or Register  to view this content.


    Regards
    This is fantastic, many thanks for you help. I just need to understand the coding behind this now!

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,118

    Re: Copy&paste Print loop help please

    You're welcome.

    If this has answered your question, please mark your thread as solved. See my signature for details or the FAQ.

    Regards

+ 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