Excel VBA Save sheet so it opens on last row -
this should dead simple i'm throwing total blank far, i've googled around , not found answer either.
i'm creating new workbook using vba , i'd save workbook opens on last row containing data when user opens it. have far:-
activeworkbook 'added last row selection sheet open @ bottom of page - ash 07/04/14 lastrow = range("a65536").end(xlup).select rows(activecell.row).activate .saveas str_destfolder & str_file, fileformat:=xlopenxmlworkbook, accessmode:=xlshared .close end
somehow failing me, appreciated!
you add following line, after activating last row:
activewindow.scrollrow = activecell.row
so full code be
activeworkbook lastrow = range("a65536").end(xlup).select rows(activecell.row).activate activewindow.scrollrow = activecell.row .saveas str_destfolder & str_file, fileformat:=xlopenxmlworkbook, accessmode:=xlshared .close end
Comments
Post a Comment