excel - Last Row and Sending Values of Cell Ranges Before Printing a Copy for Each Row - Part 2 -


i got miraculous code below in question enabled me transfer multiple values (versus 1 value original snippet) , transpose them specified range before printing, code still needs fundamental functionality worked out.

it supposed cycle through each row , transfer values cells each printed copy , printing copy each record should (eight records = 8 copies when printed good), values each row not getting sent each copy (only values last record in range of 8 getting transferred cells 8 printed copies).

sub macro1()    dim lastrow integer '    dim r integer    lastrow = sheets("employees").cells(rows.count, "a").end(xlup).row     r = 1 lastrow         sheets("sheet1").range("x50:x52").value = _             application.transpose(sheets("employees").range("a" & r).resize(, 3).value)           activewindow.selectedsheets.printout    next r end sub 

thanks in advance!

try this:

option explicit  sub macro1()      dim lastrow long     dim r long      lastrow = sheet2.cells(rows.count, "a").end(xlup).row      r = 1 lastrow         sheet1.range("x50:x52")             .value = application.transpose(sheet2.range("a" & r).resize(, 3))             .printout         end     next  end sub 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

Kivy: Swiping (Carousel & ScreenManager) -

jdbc - Not able to establish database connection in eclipse -