excel - Add a sheet after the last one and copy the last one values not formula -


i'm trying copy values (not formulas) of last sheet , name new sheet "games". i'm using this:

sub createcolumn() activesheet.copy cells.copy range("a1").pastespecial paste:=xlpastevalues application.cutcopymode = false    activesheet.name = "games"  application.screenupdating = false  end sub 

but it's creating new workbook, not new sheet after last one. me? thanks

you need add sheet first. like:

sheets.add after:=sheets(sheets.count) sheets("sheet4").select sheets("sheet4").name = "games" 

then activate copy into.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -