vba - Copy and paste data from different worksheets -


i'm trying use vb script copy data in excel sheet1 sheet2. problem paste copied data, starting in a1 , push current data in a1 bottom of new data. code far on rights, take below:

set objexcel = createobject("excel.application") set objworkbook = objexcel.workbooks.open(currentdirectory & "\test.xlsx") objworkbook.worksheets("sheet1").range("a1:b9").copy objworkbook.worksheets("sheet2").range("a1").pastespecial objexcel.activeworkbook.save objexcel.quit 

try this:

objworkbook.worksheets("sheet1").range("a1:b9").copy objworkbook.worksheets("sheet2").range("a1").insert -4121 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -