Excel VBA Find a row in another sheet, then change a cell in the same row -
i know there lots of questions this, couldn't of them work me. i'm putting print button on print sheet. when clicked take order number (which on print sheet), find on orders sheet put text ,"printed" column in same row of order. i've solved printing part no problems there. couldn't of codes work. i'm newb. please consider answers :)
sub macro1() ' ' macro1 macro ' 'activesheet.printout dim ws1 worksheet, ws2 worksheet dim acell range, bcell range dim lrow long set ws1 = sheets("sprs"): set ws2 = sheets("etÝket") set acell = ws1.columns(1).find(what:="26182-2" _ , lookin:=xlvalues, lookat:=xlwhole, searchorder:=xlbyrows, _ searchdirection:=xlnext, matchcase:=false) thisworkbook.worksheets("sprs").range(acell).value = "printed" end sub
in click buttons function print add like:
thisworkbook.worksheets("orders").range($row).value = "printed"
where $row cell want presumably correspond print sheet.
Comments
Post a Comment