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

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -