+ Reply to Thread
Results 1 to 4 of 4

print mutiple lines macro

  1. #1
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2016
    Posts
    153

    print mutiple lines macro

    I am learning VBA (still in early baby stages of it). I need to create a macro that does the following:

    select sheet 1
    copy row 2
    select sheet 2
    paste in cell a1
    print the sheet 2

    I need the macro at this point to go back to sheet 1 and do the exact same thing for row3, then row 4 etc. At times there may be a different number of rows on sheet 1 so the macro would either need to calculate how many lines of info there are so it knows how many times to run or maybe a pop up window asking the user to input the number of times the macro will run.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,888

    Re: print mutiple lines macro

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-12-2014
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2016
    Posts
    153

    Re: print mutiple lines macro

    I forgot to say thanks for this, Fluff13, thanks!!!

    I have another question …. I have created a new instances where I want to utilize your above VBA macro, however, I need to have another macro run in the middle of it. meaning, the macro would still copy the information from sheet1 and copy in sheet2, but then some other macro work would be done before it prints ………… then repeat.

    is there a way to insert another macro into what you gave me? by either saying "run macro "macronamehere" or just pasting my vba info in between 2 lines of your macro?


    Thanks

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,888

    Re: print mutiple lines macro

    You can add the line in red & change the macro name to suit
    Please Login or Register  to view this content.

+ 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. Want to seperate Multiple Lines in a cell to mutiple rows
    By PrakashPancholi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-10-2014, 05:59 AM
  2. [SOLVED] print every 44 lines (including blank lines) per page
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-02-2014, 03:40 PM
  3. Replies: 0
    Last Post: 03-19-2014, 10:33 PM
  4. [SOLVED] Macro to print only lines with cell value greater than zero
    By Matt Cowan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2013, 11:59 PM
  5. How to shorten my msgbox code or show on mutiple lines?
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2012, 06:54 PM
  6. Print mutiple sheet macro
    By Razzcul in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-11-2006, 01:55 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